MCPcopy
hub / github.com/claude-code-best/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

envUtils.test.tsFile · 0.90
shouldIncludeAttributeFunction · 0.70
fileHistoryEnabledFunction · 0.70
fileHistoryEnabledSdkFunction · 0.70
getAttachmentsFunction · 0.70
getTokenUsageAttachmentFunction · 0.70
modelSupportsEffortFunction · 0.70
preconnectAnthropicApiFunction · 0.70
shouldSkipPersistenceMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected