processconfig

0.0.2 • Public • Published

processconfig

Wrapper for process.config which throws if a property is not set or empty.

Build Status Dependencies devDependency Status
NPM

Usage

var config = require('processconfig');
 
config.read({
  // e.g.: read config from a json / yaml file or from process.env...
  foo: 'bar1',
  home: '/home/pino',
  illegal: '',
});
 
console.log(config('foo')); // > bar1
console.log(config('foooo')); // > throws because foooo is not set
console.log(config('illegal')); // > throws because illegal is empty

Tests

Run npm test.

License

See LICENSE file.

Readme

Keywords

none

Package Sidebar

Install

npm i processconfig

Weekly Downloads

2

Version

0.0.2

License

MIT

Last publish

Collaborators

  • maliciousintent