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

Function readBooleanOption

apps/sim/connectors/x/x.ts:94–98  ·  view source on GitHub ↗

* Reads a boolean toggle from a dropdown config field that stores 'true' / 'false' * strings. Falls back to `defaultValue` when unset or unrecognized.

(value: unknown, defaultValue: boolean)

Source from the content-addressed store, hash-verified

92 * strings. Falls back to `defaultValue` when unset or unrecognized.
93 */
94function readBooleanOption(value: unknown, defaultValue: boolean): boolean {
95 if (value === 'true' || value === true) return true
96 if (value === 'false' || value === false) return false
97 return defaultValue
98}
99
100/**
101 * Parses the configured usernames into a normalized, deduplicated handle list.

Callers 1

buildListParamsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected