nconf
nconf copied to clipboard
Hierarchical node.js configuration with files, environment variables, command-line arguments, and atomic object merging.
I used config json file to save my config. but I rarely sometimes encountered an empty file and I didn't know why. Until recently this happend when electricity was gone...
In the example you can open multiple files. When you run save(), how do I specify where it goes? ``` nconf.file('path/to/your/config.json'); // add multiple files, hierarchically. notice the unique key...
* was a devDependency before * this fixes #408
currently **async** is a **devDependency** in [project.json](https://github.com/indexzero/nconf/blob/ce212b2f1dbf96cee001b5f621979c564638f0e7/package.json#L26) But since it is required in the sources (e.g. in [common.js](https://github.com/indexzero/nconf/blob/ce212b2f1dbf96cee001b5f621979c564638f0e7/lib/nconf/common.js#L9)), it should be a **dependency**, right?
Enables the nconf argv loader to receive a second argument of options (e.g., `parseValues`, `transform`, etc) when passing in a custom or pre-configured `yargs` instance. Example: ```js let yargs =...
Forgive me if this is a silly question, but after a few hours reading the docs for `nconf` and `yargs` I've not been able to figure it out. Say I...
What is reset supposed to do? This piece of code: var nconf = require('nconf'); nconf.use('test1', { type: 'literal', store: { 'item1': 'item1' } }); nconf.use('test2',{ type: 'literal', store: { 'item2':...
Adding `toString()` function that allows exporting of entire store state to JSON string.
When keys are modified and saved. They get saved to the first file to be opened not the last in the merge list. This seems to break any ability to...
Defaults behave like overrides if specified before other stores. ``` javascript var nconf = require('nconf'); nconf.defaults({ 'ATTACK_ROLE': 'ninjas' }); process.env['ATTACK_ROLE'] = 'pirates'; var whitelist = ['ATTACK_ROLE']; nconf.env({ whitelist: whitelist });...