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

Function keyOf

ark/schema/units.ts:1245–1246  ·  view source on GitHub ↗
(root: BaseRoot)

Source from the content-addressed store, hash-verified

1243 const unitsByKey: Record<string, string | undefined> = {}
1244 const keysById: Record<NodeId, string> = {}
1245 const keyOf = (root: BaseRoot) =>
1246 (keysById[root.id] ??= precompiledKeyOf(root))
1247 for (const root of roots) {
1248 if (root.hasAlias || keyOf(root) in unitsByKey) continue
1249 for (const unit of precompileRootUnits(root)) {

Callers 2

writePrecompiledUnitsFunction · 0.70
writePrecompiledUnitFunction · 0.70

Calls 1

precompiledKeyOfFunction · 0.85

Tested by

no test coverage detected