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

Function isPositive

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

Source from the content-addressed store, hash-verified

527 * @since 4.0.0
528 */
529export const isPositive = (self: Duration): boolean => {
530 switch (self.value._tag) {
531 case "Millis":
532 return self.value.millis > 0
533 case "Nanos":
534 return self.value.nanos > bigint0
535 case "Infinity":
536 return true
537 case "NegativeInfinity":
538 return false
539 }
540}
541
542/**
543 * Returns the absolute value of the duration.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected