MCPcopy Create free account
hub / github.com/formkit/formkit / mergeProps

Function mergeProps

packages/core/src/node.ts:2388–2398  ·  view source on GitHub ↗
(
  props: FormKitPseudoProps,
  newProps: FormKitPseudoProps
)

Source from the content-addressed store, hash-verified

2386}
2387
2388function mergeProps(
2389 props: FormKitPseudoProps,
2390 newProps: FormKitPseudoProps
2391): FormKitPseudoProps {
2392 if (Array.isArray(props) && Array.isArray(newProps))
2393 return props.concat(newProps)
2394 return merge(toPropsObj(props), toPropsObj(newProps)) as Record<
2395 PropertyKey,
2396 FormKitPseudoProp
2397 >
2398}
2399
2400/**
2401 * Adds a child to the node.

Callers 3

defineFunction · 0.85
addPropsFunction · 0.85
renderFunction · 0.85

Calls 2

mergeFunction · 0.85
toPropsObjFunction · 0.85

Tested by 1

renderFunction · 0.68