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

Function isSortConditionArray

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

Source from the content-addressed store, hash-verified

147}
148
149const isSortConditionArray = (value: unknown): value is SortRule[] => {
150 if (!Array.isArray(value) || value.length === 0) return false
151 const firstItem = value[0]
152 return (
153 typeof firstItem === 'object' &&
154 firstItem !== null &&
155 'column' in firstItem &&
156 'direction' in firstItem &&
157 typeof firstItem.column === 'string' &&
158 (firstItem.direction === 'asc' || firstItem.direction === 'desc')
159 )
160}
161
162/**
163 * Attempts to parse a JSON string, returning the parsed value or the

Callers 1

getDisplayValueFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected