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

Function forEachElement

ark/schema/units.ts:458–466  ·  view source on GitHub ↗
(
	value: unknown,
	depth: number,
	f: (value: unknown) => void
)

Source from the content-addressed store, hash-verified

456
457// a tuple's defaults nest each thunk in an array of pairs
458const forEachElement = (
459 value: unknown,
460 depth: number,
461 f: (value: unknown) => void
462): void => {
463 if (depth && isArray(value))
464 for (const element of value) forEachElement(element, depth - 1, f)
465 else f(value)
466}
467
468let constantNames: Map<unknown, string> | undefined
469

Callers 1

keyRegisteredNamesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected