Skip to content

01alchemist/env

Repository files navigation

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

Releases

No releases published

Packages

No packages published