Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

env-accessors

0.2.2 • Public • Published

env-accessors

Build Status NPM version NPM downloads LICENSE

process.env accessor functions.

$ npm install env-accessors --save

API

.del

aliases: -

Delete given key from process.env.

del('DISABLED_SERVICES');
.get

aliases: -

Get given key's value from process.env.

get('DATABASE_NAME');
.has

aliases: contains

Whether process.env contains given key.

has('NEW_RELIC_LICENSE_KEY');
.missing

aliases: -

Whether given key is missing from process.env.

missing('NEW_RELIC_LICENSE_KEY');
.required

aliases: assert

Throw a ReferenceError if given key is missing from process.env and return given key's value from process.env otherwise.

required('NEW_RELIC_LICENSE_KEY');
.set

aliases: put

Set value for process.env[key].

set({ DATABASE_HOST: 'localhost' });

License

MIT

Install

npm i env-accessors

DownloadsWeekly Downloads

11

Version

0.2.2

License

MIT

Last publish

Collaborators

  • avatar