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

Function innerHashesMatch

ark/schema/node.ts:408–411  ·  view source on GitHub ↗
(l: BaseNode, r: BaseNode)

Source from the content-addressed store, hash-verified

406 l.hash === r.hash && (l.hash.endsWith("}") || isJsonEqual(l.json, r.json))
407
408export const innerHashesMatch = (l: BaseNode, r: BaseNode): boolean =>
409 (l.kind === r.kind ? l.sameInner(r) : undefined) ??
410 (l.innerHash === r.innerHash &&
411 (l.innerHash.endsWith("}") || isJsonEqual(l.innerJson, r.innerJson)))
412
413const equalJson = new WeakMap<object, WeakSet<object>>()
414

Callers 4

extendsFunction · 0.90
meetsImpliedFunction · 0.90
equalsFunction · 0.85
isSimulatedFunction · 0.85

Calls 2

isJsonEqualFunction · 0.85
sameInnerMethod · 0.45

Tested by

no test coverage detected