nco

nconf4policy

define configure value policy for nconf

Showing:

Popularity

Downloads/wk

0

GitHub Stars

0

Maintenance

Last Commit

5yrs ago

Contributors

0

Package

Dependencies

2

Size (min+gzip)

22.6KB

License

ISC

Type Definitions

Tree-Shakeable

No?

Categories

Readme

nconf4policy

Installation

$ npm install nconf4policy

Example

var nconf = require('nconf4policy');
// policy priority 'file' > 'overrides' > 'defaults'

nconf.overrides({foo:'bar'});
nconf.get('foo');
// bar

nconf.defaults({foo:'helloworld'});
nconf.get('foo');
// bar

nconf.defaults({foo:'helloworld'});
// throw Error: duplicate configure key.

nconf.file({file:'/tmp/nconf.json'});
nconf.set('foo', 'helloworld');
nconf.get('foo');
// helloworld

nconf.save();
// { foo: 'helloworld' }

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100