Libraries
    Preparing search index...

    Function envBoolean

    • Create a boolean schema tuned for environment variables.

      The base schema boolean().coerce() intentionally accepts only "true"/"false". Environment variables often use shell-style toggles such as 1, 0, yes, no, on, and off, so this helper normalizes those values before boolean validation runs.

      Parameters

      Returns ExtendedBoolean

      A boolean schema builder with env-style string preprocessing.

      const config = parseEnv({
      debug: env('DEBUG', envBoolean().default(false)),
      });