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

Function toOptionalBoolean

apps/sim/tools/daytona/utils.ts:69–76  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

67 * empty/missing values as undefined.
68 */
69export function toOptionalBoolean(value: unknown): boolean | undefined {
70 if (value === undefined || value === null || value === '') return undefined
71 if (typeof value === 'boolean') return value
72 const normalized = String(value).trim().toLowerCase()
73 if (normalized === 'true') return true
74 if (normalized === 'false') return false
75 return undefined
76}
77
78/**
79 * Maps a raw Daytona sandbox object to the normalized summary shape.

Callers 1

create_sandbox.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected