MCPcopy
hub / github.com/codeaashu/claude-code / isEnvTruthy

Function isEnvTruthy

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

Source from the content-addressed store, hash-verified

30}
31
32export function isEnvTruthy(envVar: string | boolean | undefined): boolean {
33 if (!envVar) return false
34 if (typeof envVar === 'boolean') return envVar
35 const normalizedValue = envVar.toLowerCase().trim()
36 return ['1', 'true', 'yes', 'on'].includes(normalizedValue)
37}
38
39export function isEnvDefinedFalsy(
40 envVar: string | boolean | undefined,

Callers 15

addToHistoryFunction · 0.85
getAllBaseToolsFunction · 0.85
getToolsFunction · 0.85
context.tsFile · 0.85
showSetupScreensFunction · 0.85
submitMessageMethod · 0.85
startDeferredPrefetchesFunction · 0.85
initializeEntrypointFunction · 0.85
mainFunction · 0.85
runFunction · 0.85
maybeActivateProactiveFunction · 0.85
maybeActivateBriefFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected