0.0.2 • Published 9 years ago

processconfig v0.0.2

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

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.