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

Function extendable

packages/inputs/src/compose.ts:286–296  ·  view source on GitHub ↗
(extensions: FormKitSectionsSchema)

Source from the content-addressed store, hash-verified

284 section: FormKitSchemaExtendableSection
285): FormKitSchemaExtendableSection {
286 const extendable = (extensions: FormKitSectionsSchema) => {
287 const node = section(extensions)
288 const attributes = typeof attrs === 'function' ? attrs() : attrs
289 if (!isObject(attributes)) return node
290 if (isSlotCondition(node) && isDOM(node.else)) {
291 node.else.attrs = { ...node.else.attrs, ...attributes }
292 } else if (isDOM(node)) {
293 node.attrs = { ...node.attrs, ...attributes }
294 }
295 return node
296 }
297 extendable._s = section._s
298 return extendable
299}

Callers

nothing calls this directly

Calls 6

isObjectFunction · 0.90
isDOMFunction · 0.90
isSchemaObjectFunction · 0.90
extendSchemaFunction · 0.90
isSlotConditionFunction · 0.85
attrsFunction · 0.50

Tested by

no test coverage detected