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

Function hashesMatch

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

Source from the content-addressed store, hash-verified

403
404// digests can collide, so hashes ending in one are confirmed by their JSON
405export const hashesMatch = (l: BaseNode, r: BaseNode): boolean =>
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) ??

Callers 7

mergePropGroupFunction · 0.90
splitMorphBranchFunction · 0.90
splitRangeBranchFunction · 0.90
canBranchNarrowToFunction · 0.90
splitPropBranchFunction · 0.90
nodesEqualFunction · 0.90
sequencesMatchFunction · 0.90

Calls 1

isJsonEqualFunction · 0.85

Tested by

no test coverage detected