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

Function sanitizeVariable

apps/sim/lib/workflows/comparison/normalize.ts:213–219  ·  view source on GitHub ↗
(
  variable: VariableWithUiFields | null | undefined
)

Source from the content-addressed store, hash-verified

211 * @returns Sanitized variable object
212 */
213export function sanitizeVariable(
214 variable: VariableWithUiFields | null | undefined
215): Omit<VariableWithUiFields, 'validationError' | 'workflowId'> | null | undefined {
216 if (!variable || typeof variable !== 'object') return variable
217 const { validationError: _validationError, workflowId: _workflowId, ...rest } = variable
218 return rest
219}
220
221/**
222 * Normalizes the variables structure to always be an object.

Callers 3

normalize.test.tsFile · 0.90
normalizeWorkflowStateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected