@seed-media/env

2.2.1 • Public • Published

Environment Loader/Reader

Usage

const env = require('@seed-media/env')

// Getting variables
const databaseHost = env.get('DB_HOST')

// Getting variables with a default
const endpoint = env.get('ENDPOINT', 'https://localhost')

// Setting variables
env.set('MY_ENV_VAR', 'value')

## Notes

Truthy or falsey envrionment variables are converted to boolean values. For example

FOO=true // bool true
FOO=1 // bool true
FOO=false // bool false
FOO=0 // bool false

Readme

Keywords

none

Package Sidebar

Install

npm i @seed-media/env

Weekly Downloads

8

Version

2.2.1

License

MIT

Last publish

Collaborators

  • nosleepfilipe
  • benswinburne
  • seed-media-user