processconfig
Wrapper for process.config which throws if a property is not set or empty.
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')); // > bar1console.log(config('foooo')); // > throws because foooo is not setconsole.log(config('illegal')); // > throws because illegal is empty
Tests
Run npm test
.
License
See LICENSE
file.