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

Function isSchemaObject

packages/inputs/src/createSection.ts:161–172  ·  view source on GitHub ↗
(
  schema: FormKitSchemaNodeExtension | FormKitSchemaCondition | null
)

Source from the content-addressed store, hash-verified

159 * @public
160 */
161export function isSchemaObject(
162 schema: FormKitSchemaNodeExtension | FormKitSchemaCondition | null
163): schema is
164 | FormKitSchemaDOMNode
165 | FormKitSchemaComponent
166 | FormKitSchemaFormKit {
167 return !!(
168 schema &&
169 typeof schema === 'object' &&
170 ('$el' in schema || '$cmp' in schema || '$formkit' in schema)
171 )
172}
173
174/**
175 * Extends a single schema node with an extension. The extension can be any

Callers 3

extendableFunction · 0.90
$forFunction · 0.90
extendSchemaFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected