Skip to content

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

TypeScript
391 B
Raw Blame
/**
 * Whether a variable reads as on, as the CLI reads its boolean switches:
 * `1`, `true`, `yes` or `on`, in any case, spaces around it ignored.
 *
 * @param value the variable as the environment holds it
 * @returns true for one of the four spellings
 */
export const isEnvTruthy = (value: string | undefined) =>
  ['1', 'true', 'yes', 'on'].includes((value ?? '').trim().toLowerCase())