MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / applyChild

Function applyChild

packages/react/src/components/json-schema-form.tsx:181–186  ·  view source on GitHub ↗
(
  value: Record<string, unknown>,
  key: string,
  next: unknown,
)

Source from the content-addressed store, hash-verified

179/** Apply a child field's emitted value to its object parent: the REMOVE sentinel
180 * deletes the key, anything else sets it. */
181const applyChild = (
182 value: Record<string, unknown>,
183 key: string,
184 next: unknown,
185): Record<string, unknown> =>
186 next === REMOVE ? removeProperty(value, key) : setProperty(value, key, next);
187
188/** Coerce a number-input string to a JSON number, or `undefined` if not a finite
189 * number (caller keeps last-valid + marks invalid). */

Callers 1

ObjectFieldsFunction · 0.85

Calls 2

removePropertyFunction · 0.85
setPropertyFunction · 0.85

Tested by

no test coverage detected