MCPcopy Index your code
hub / github.com/simstudioai/sim / sanitizeInputFormat

Function sanitizeInputFormat

apps/sim/lib/workflows/comparison/normalize.ts:242–251  ·  view source on GitHub ↗
(inputFormat: unknown[] | undefined)

Source from the content-addressed store, hash-verified

240 * @returns Sanitized input format array
241 */
242export function sanitizeInputFormat(inputFormat: unknown[] | undefined): Record<string, unknown>[] {
243 if (!Array.isArray(inputFormat)) return []
244 return inputFormat.map((item) => {
245 if (item && typeof item === 'object' && !Array.isArray(item)) {
246 const { collapsed, ...rest } = item as InputFormatItem
247 return rest
248 }
249 return item as Record<string, unknown>
250 })
251}
252
253/** Normalized edge with only connection-relevant fields */
254interface NormalizedEdge {

Callers 3

normalize.test.tsFile · 0.90
sanitizeInputsForLogMethod · 0.90
normalizeSubBlockValueFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected