MCPcopy Create free account
hub / github.com/SmartThingsCommunity/smartthings-cli / booleanConfigValue

Function booleanConfigValue

src/lib/cli-config.ts:154–165  ·  view source on GitHub ↗
(keyName: string, defaultValue = false)

Source from the content-addressed store, hash-verified

152 return defaultValue
153 }
154
155 function booleanConfigValue(keyName: string, defaultValue = false): boolean {
156 if (keyName in profile) {
157 const configValue = profile[keyName]
158 if (typeof configValue === 'boolean') {
159 return configValue
160 }
161 logger.warn(`expected boolean value for config key ${keyName} but got ${typeof profile[keyName]}`)
162 return defaultValue
163 }
164 logger.trace(`key ${keyName} not found in ${description.profileName} config`)
165 return defaultValue
166 }
167
168 return {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected