Get unlimited public & private packages + team-based management with npm Teams.Learn more »

@01/env

1.0.2 • Public • Published

env

CircleCI Maintainability Test Coverage

Nodejs env utils

env

const nodeEnv:string = env("NODE_ENV", "development")
// process.env.NODE_ENV or "development"

envInt

const timeout:number = envInt("TIMEOUT", 5000)
// process.env.TIMEOUT as int or 5000

envFloat

const scaleFactor:number = envFloat("SCALE_FACTOR", 2.56)
// process.env.SCALE_FACTOR as float or 2.56

envBoolean

const isEnabled:boolean = envBoolean("IS_ENABLED", false)
// process.env.IS_ENABLED as boolean or false

Install

npm i @01/env

DownloadsWeekly Downloads

178

Version

1.0.2

License

MIT

Unpacked Size

72.7 kB

Total Files

15

Last publish

Collaborators

  • avatar