Skip to content

stevemao/force-env

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Related

  • force-num - Ensure environment variable exists and convert to a number. If not, throw to fail early.

About

Ensure environment variable exists. If not, throw to fail early.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published