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

Function normalizeSubBlockValue

apps/sim/lib/workflows/comparison/normalize.ts:474–485  ·  view source on GitHub ↗
(subBlockId: string, value: unknown)

Source from the content-addressed store, hash-verified

472 * @returns Normalized value
473 */
474export function normalizeSubBlockValue(subBlockId: string, value: unknown): unknown {
475 let normalizedValue = value ?? null
476
477 if (subBlockId === 'tools' && Array.isArray(normalizedValue)) {
478 normalizedValue = sanitizeTools(normalizedValue)
479 }
480 if (subBlockId === 'inputFormat' && Array.isArray(normalizedValue)) {
481 normalizedValue = sanitizeInputFormat(normalizedValue)
482 }
483
484 return normalizedValue
485}
486
487/**
488 * Extracts subBlock fields for comparison, excluding diff markers.

Callers 2

normalizeWorkflowStateFunction · 0.85

Calls 2

sanitizeInputFormatFunction · 0.85
sanitizeToolsFunction · 0.70

Tested by

no test coverage detected