MCPcopy Create free account
hub / github.com/Noumena-Network/code / isEnvTruthy

Function isEnvTruthy

src/utils/envUtils.ts:62–67  ·  view source on GitHub ↗
(envVar: string | boolean | undefined)

Source from the content-addressed store, hash-verified

60}
61
62export function isEnvTruthy(envVar: string | boolean | undefined): boolean {
63 if (!envVar) return false
64 if (typeof envVar === 'boolean') return envVar
65 const normalizedValue = envVar.toLowerCase().trim()
66 return ['1', 'true', 'yes', 'on'].includes(normalizedValue)
67}
68
69export function isEnvDefinedFalsy(
70 envVar: string | boolean | undefined,

Callers 3

isBareModeFunction · 0.70
isRunningOnHomespaceFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected