@thinice/env-flag
v0.1.4
Published
Reads process.env.FLAG and coerces to boolean
Readme
@thinice/env-flag
Reads process.env.FLAG and coerces to boolean.
Installation
npm install @thinice/env-flagUsage
import { envFlag } from "@thinice/env-flag";
envFlag("DEBUG"); // true if set and truthy
envFlag("DEBUG", true); // default if unsetReturns false for: "", "0", "false" (case-insensitive).
Returns true for any other value: "1", "true", "yes", etc.
Source
https://github.com/thinicejs/utils/tree/main/packages/env-flag
