MCPcopy Create free account
hub / github.com/Botloader/botloader / booleanValue

Function booleanValue

frontend/src/components/GuildScriptPage.tsx:488–495  ·  view source on GitHub ↗
(rawValue: any, option: SettingsOption)

Source from the content-addressed store, hash-verified

486}
487
488function booleanValue(rawValue: any, option: SettingsOption) {
489 const defaultValue = option.defaultValue ?? false
490 if (rawValue === undefined || rawValue === null) {
491 return booleanRawValue(defaultValue)
492 }
493
494 return booleanRawValue(rawValue)
495}
496
497const trueBooleanValues = ["true", "yes", "1"]
498function booleanRawValue(rawValue: any) {

Callers 1

EditOptionBooleanFieldFunction · 0.85

Calls 1

booleanRawValueFunction · 0.85

Tested by

no test coverage detected