Commit graph

21 commits

Author SHA1 Message Date
Matt Hamann
35088a3313 Added nconf.any method (#278)
* Added nconf.any method

Fixes #126
Implemented on the Provider class
Takes an array of keys, or a variable argument list
Supports both callback and non-callback invocations

* Use an explicit search base in file store test

Fixes #224
Test file was created under process.env.HOME, but test was searching in
the current working directory. If the cwd was not on the same drive as
the home directory, the test would fail.

* Added some API documentation to README for 'any'

* Tweak `.any` documentation
2017-10-21 16:42:24 -04:00
Matt Hamann
ca10d0eaf8 Add basic linting rules 2017-10-21 16:01:06 -04:00
Wojtek Turyn
5d6e236b73 fixed 2015-10-15 10:44:26 +02:00
Wojtek Turyn
37a84ae8df required() method 2015-10-15 10:16:33 +02:00
Jarrett Cruger
6271cdb35d Revert "fixing the tests"
This reverts commit f69e43a423.
2014-11-26 12:49:50 -05:00
indexzero
af0e9fb7e7 [dist fix] Cleanup some whitespace. 2014-11-26 01:31:48 -05:00
Chris Manson
f69e43a423 fixing the tests 2014-05-27 17:43:24 +01:00
Bradley Meck
683f78918c [fix] #59 root get/set should work via null/undefined as key 2012-09-07 09:29:30 -05:00
Russell Frank
36e061c4bd Fixes to Provider.save() and tests.
Fixed `Provider.save()` to properly ignore stores which do not provide
a saveSync method.  Also, fixed `save()` to properly save asynchronously
when an async `save()` method on a store is provided.

Removed the tests from `nconf-test.js` which expected `save()` to throw
or return an error when a store without `save()` methods was
encountered. Also removed a `console.log` from `provider-test.js`.
2012-05-01 22:44:15 -04:00
indexzero
464af417fe [fix test] Fix bad test assertion 2012-01-02 17:27:09 -05:00
indexzero
6242caafda [api minor] Add .loadSync() to Memory store. Fixes #24 2012-01-02 17:20:06 -05:00
indexzero
6c720ee109 [dist] Update Copyright and Author to Nodejitsu Inc. 2011-11-24 00:33:08 -05:00
indexzero
16a18bffe6 [refactor] Expose all store prototypes on nconf.*. Expose store instances on Provider.stores and Provider.sources 2011-11-24 00:29:43 -05:00
indexzero
c3cebe7cb4 [refactor] Rename .sources to ._stores and bring back ._sources 2011-11-24 00:29:39 -05:00
indexzero
c3c315d648 [refactor] Refactor to make using nconf more fluent. 2011-11-24 00:29:15 -05:00
indexzero
1ef5797e83 [api test] Finished API and tests for hierarchical configuration storage. 2011-09-18 21:37:01 -04:00
indexzero
da2da7aea8 [api test breaking refactor] Significant refactor to how nconf works. Now a fully hierarchical configuration storage mechanism capable of multiple levels of stores of the same type. 2011-09-16 06:49:47 -04:00
indexzero
13f5753405 [minor] Update nconf.version to use pkginfo 2011-06-05 01:39:39 -04:00
indexzero
9da37dff2a [dist api test] Refactor pluggable nconf-level logic into nconf.Provider. Update .gitignore for npm 1.0. Update pathing in source and tests to be more require.paths future-proof 2011-05-14 01:47:26 -04:00
indexzero
79717ac3b1 [test] More tests for nconf 2011-04-02 04:41:50 -04:00
indexzero
09b8c75383 [api test doc] Internal fixes from testing. More tests and docs 2011-04-02 04:31:20 -04:00