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

Function checkDigest

ark/type/runtime.ts:1338–1345  ·  view source on GitHub ↗
(
	value: unknown,
	expected: string,
	label: string = unnamed
)

Source from the content-addressed store, hash-verified

1336const unnamed = "A value a validator reads"
1337
1338export const checkDigest = (
1339 value: unknown,
1340 expected: string,
1341 label: string = unnamed
1342): void => {
1343 if (!hasDomain(value, "object") || digestOf(value) !== expected)
1344 throwError(writeDigestMismatchMessage(label))
1345}
1346
1347export const checkFacts = (
1348 actual: HoleFact,

Callers

nothing calls this directly

Calls 4

hasDomainFunction · 0.90
throwErrorFunction · 0.90
digestOfFunction · 0.70

Tested by

no test coverage detected