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

Function isNegative

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

Source from the content-addressed store, hash-verified

498 * @since 4.0.0
499 */
500export const isNegative = (self: Duration): boolean => {
501 switch (self.value._tag) {
502 case "Millis":
503 return self.value.millis < 0
504 case "Nanos":
505 return self.value.nanos < bigint0
506 case "NegativeInfinity":
507 return true
508 case "Infinity":
509 return false
510 }
511}
512
513/**
514 * 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