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

Function isZero

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

Source from the content-addressed store, hash-verified

221 * @category guards
222 */
223export const isZero = (self: Duration): boolean => {
224 switch (self.value._tag) {
225 case "Millis": {
226 return self.value.millis === 0
227 }
228 case "Nanos": {
229 return self.value.nanos === bigint0
230 }
231 case "Infinity": {
232 return false
233 }
234 }
235}
236
237/**
238 * @since 2.0.0

Callers 1

formatFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected