force-env
v1.0.2
Published
Ensure environment variable exists. If not, throw to fail early.
Downloads
86
Readme
Ensure environment variable exists. If not, throw to fail early.
import forceEnv from 'force-env'
const nodeEnv = forceEnv('NODE_ENV')
// => 'development', 'production', 'test', or throw if not set