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

Function isString

packages/effect/src/net/Dns.ts:295–295  ·  view source on GitHub ↗
(u: unknown)

Source from the content-addressed store, hash-verified

293const isUint16 = (u: unknown): boolean => Number.isInteger(u) && (u as number) >= 0 && (u as number) <= 0xffff
294const isUint32 = (u: unknown): boolean => Number.isInteger(u) && (u as number) >= 0 && (u as number) <= 0xffffffff
295const isString = (u: unknown): u is string => typeof u === "string"
296// SOA timers are 32-bit unsigned counts of seconds on the wire.
297const isTimer = (u: unknown): boolean =>
298 Duration.isDuration(u) && Duration.isFinite(u) && isUint32(Duration.toSeconds(u))

Callers 4

toStringFunction · 0.90
Stream.tsFile · 0.90
effect.tsFile · 0.90
Dns.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected