MCPcopy Create free account
hub / github.com/arktypeio/arktype / defaultKey

Function defaultKey

ark/type/deferred.ts:663–669  ·  view source on GitHub ↗
(of: Facts, value: unknown)

Source from the content-addressed store, hash-verified

661}
662
663const defaultKey = (of: Facts, value: unknown) =>
664 `${wrap(of)}=${
665 typeof value === "function" ? fnKey(value)
666 : typeof value === "string" ? `string:${JSON.stringify(value)}`
667 : typeof value === "number" && Object.is(value, -0) ? "number:-0"
668 : `${typeof value}:${String(value)}`
669 }`
670
671const isUnit = (node: BaseNode) => node.is("unit")
672

Callers 2

scanUncachedFunction · 0.85
walkLiteralFunction · 0.85

Calls 4

fnKeyFunction · 0.85
StringInterface · 0.85
isMethod · 0.80
wrapFunction · 0.70

Tested by

no test coverage detected