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.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.2
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.2
    0
  • 0.0.1
    0

Package Sidebar

Install

npm i processconfig

Weekly Downloads

0

Version

0.0.2

License

MIT

Last publish

Collaborators

  • maliciousintent