MCPcopy Create free account
hub / github.com/Effect-TS/effect / isNegative

Function isNegative

packages/effect/src/Duration.ts:564–575  ·  view source on GitHub ↗
(self: Duration)

Source from the content-addressed store, hash-verified

562 * @since 4.0.0
563 */
564export const isNegative = (self: Duration): boolean => {
565 switch (self.value._tag) {
566 case "Millis":
567 return self.value.millis < 0
568 case "Nanos":
569 return self.value.nanos < bigint0
570 case "NegativeInfinity":
571 return true
572 case "Infinity":
573 return false
574 }
575}
576
577/**
578 * Returns `true` if the duration is positive (strictly greater than zero).

Callers 1

formatFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected