Envobj
Tiny environment variable helper.
Ensures that all the required variables are present. Throws on invalid and missing values.
Install
npm install envobj
Usage
const envobj string number boolean = ; const env = ;
Built-in validators: string
, number
, boolean
and integer
.
.env
Use with localenv
to populate process.env
automatically in development from .env
and .env.local
.
; ; const env = ;
Tip: Check in .env
and exclude .env.local
so teammates can get started quickly.
License
MIT