Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Argv store separator (#291)
* argv store now accept a separator argument to create nested values * remove stub file that shouldnt have been commited * write a test to ensure separator is working well and use delete rather than undefined assign
- Loading branch information
1 parent
bac910a
commit 16667be
Showing
4 changed files
with
68 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
test/fixtures/scripts/nconf-hierarchical-load-merge-with-separator.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/* | ||
* nconf-hierarchical-load-merge.js: Test fixture for loading and merging nested objects across stores. | ||
* | ||
* (C) 2012, Charlie Robbins and the Contributors. | ||
* (C) 2012, Michael Hart | ||
* | ||
*/ | ||
|
||
var path = require('path'), | ||
nconf = require('../../../lib/nconf'); | ||
|
||
nconf.argv({separator: '--'}) | ||
.env('__') | ||
.file(path.join(__dirname, '..', 'merge', 'file1.json')); | ||
|
||
process.stdout.write(JSON.stringify({ | ||
apples: nconf.get('apples'), | ||
candy: nconf.get('candy') | ||
})); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.