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

Function parseSoapBoolean

apps/sim/tools/workday/soap.ts:119–128  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

117 * Returns null when the value is null/undefined or unrecognized.
118 */
119export function parseSoapBoolean(value: unknown): boolean | null {
120 if (value == null) return null
121 if (typeof value === 'boolean') return value
122 if (typeof value === 'string') {
123 const trimmed = value.trim().toLowerCase()
124 if (trimmed === 'true' || trimmed === '1') return true
125 if (trimmed === 'false' || trimmed === '0') return false
126 }
127 return null
128}
129
130/**
131 * Coerces a SOAP scalar to a number. The XML parser returns leaf text as strings,

Callers 1

route.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected