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

Function addEntry

ark/schema/shared/errorReaders.ts:83–86  ·  view source on GitHub ↗
(result: Record<string, v[]>, k: string, value: v)

Source from the content-addressed store, hash-verified

81 error.propString ?? stringifyPath(error.path)
82
83const addEntry = <v>(result: Record<string, v[]>, k: string, value: v) => {
84 if (hasOwn(result, k)) result[k].push(value)
85 else defineEntry(result, k, [value])
86}
87
88// defined, since assigning a path "__proto__" would set the prototype
89const defineEntry = (result: object, k: string, value: unknown) =>

Callers 3

flatByPathFunction · 0.85
flatMessagesByPathFunction · 0.85
byAncestorPathFunction · 0.85

Calls 3

hasOwnFunction · 0.90
defineEntryFunction · 0.85
pushMethod · 0.45

Tested by

no test coverage detected