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

Function isZero

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

Source from the content-addressed store, hash-verified

533 * @since 3.5.0
534 */
535export const isZero = (self: Duration): boolean => {
536 switch (self.value._tag) {
537 case "Millis":
538 return self.value.millis === 0
539 case "Nanos":
540 return self.value.nanos === bigint0
541 case "Infinity":
542 case "NegativeInfinity":
543 return false
544 }
545}
546
547/**
548 * Returns `true` if the duration is negative (strictly less than zero).

Callers 1

formatFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected