MCPcopy
hub / github.com/simstudioai/sim / isFieldFormatArray

Function isFieldFormatArray

apps/sim/lib/workflows/subblocks/display.ts:67–77  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

65}
66
67const isFieldFormatArray = (value: unknown): value is FieldFormat[] => {
68 if (!Array.isArray(value) || value.length === 0) return false
69 const firstItem = value[0]
70 return (
71 typeof firstItem === 'object' &&
72 firstItem !== null &&
73 'id' in firstItem &&
74 'name' in firstItem &&
75 typeof firstItem.name === 'string'
76 )
77}
78
79/** Type guard for variable assignments arrays (variables-input subblocks). */
80const isVariableAssignmentsArray = (

Callers 1

getDisplayValueFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected