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

Function isZero

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

Source from the content-addressed store, hash-verified

470 * @since 3.5.0
471 */
472export const isZero = (self: Duration): boolean => {
473 switch (self.value._tag) {
474 case "Millis":
475 return self.value.millis === 0
476 case "Nanos":
477 return self.value.nanos === bigint0
478 case "Infinity":
479 case "NegativeInfinity":
480 return false
481 }
482}
483
484/**
485 * 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