MCP Server Framework - v1.0.0
    Preparing search index...

    Function parseEnvBoolean

    • Parse an environment variable as a boolean.

      Environment variables are always strings, so this helper provides consistent boolean parsing across the codebase. Also handles the case where a boolean is passed through directly (e.g., from a pre-parsed config object).

      Parameters

      • value: string | boolean | undefined

        The environment variable value

      Returns boolean

      true if value equals 'true' (case-insensitive) or is boolean true, false otherwise

      parseEnvBoolean('true')   // true
      parseEnvBoolean('TRUE') // true
      parseEnvBoolean('True') // true
      parseEnvBoolean('false') // false
      parseEnvBoolean('1') // false
      parseEnvBoolean(undefined) // false
      parseEnvBoolean(true) // true (passthrough)