MCPcopy Create free account
hub / github.com/ScaleML/AgentSPEX / normalizeValue

Function normalizeValue

yaml-flow-editor/src/utils/workflowStepConverters.ts:34–39  ·  view source on GitHub ↗
(value: T | null | undefined, defaultValue: T)

Source from the content-addressed store, hash-verified

32 * Normalize null/undefined to a default value.
33 */
34export function normalizeValue<T>(value: T | null | undefined, defaultValue: T): T {
35 if (value === null || value === undefined) {
36 return defaultValue;
37 }
38 return value;
39}
40
41/**
42 * Recursively normalize an object, converting null/undefined leaves to empty strings.

Callers 2

processWorkflowStepFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected