Commit graph

23 commits

Author SHA1 Message Date
louis-murray
391665cc38 Enable writes env and argv stores with a flag (#285)
* added fucntionality to toggle readonly for env store

* fixed issue with using lint

* updated readme to reflect env options change

* updated tests to better test readOnly property

* added fucntionality to toggle readonly for env store

* fixed issue with using lint

* updated readme to reflect env options change

* updated tests to better test readOnly property

* updated tests to fix issues.

* updated argv to have readOnly toggle-able

* added tests for argv toggle-able readonly
2017-11-12 23:11:01 -05:00
Adrien Becchis
467ab753c8 Regex as env separator (#288)
* use regexp as env separator (support shorthand specification)

* add test to cover the env separator
2017-11-04 21:30:56 -04:00
Matt Hamann
856fdf8dff First pass at transform functions (#279) 2017-10-25 22:57:58 -04:00
Matt Hamann
b9c345bf96 Fix parseValues option name 2017-10-21 21:58:30 -04:00
Matt Hamann
532ac9cc57 Support parsing simple values from env/argv strings (#273)
* simple parse, indexzero/nconf#72

* documentation for tryParse option

* Combine JSON parsing and simple parsing
2017-10-21 15:39:16 -04:00
Matt Hamann
b8402d4eab Enable support for parsing JSON environment variables (#272)
* Add support for applying JSON string

* only take JSON Object or JSON Array into consideration

* Add tests and make JSON-parsing opt-in
2017-09-27 16:32:26 -04:00
Jan Klosinski
392c6022c9 Copy process.env before lower-casing the keys
`process.env` is read-only in GitBash (and potentially other consoles),
so the `lowerCase` flag had no effect.
2016-03-01 17:08:35 +00:00
Jarrett Cruger
54f2287dd8 Merge pull request #177 from olalonde/master
env({lowerCase:true}) option to make it possible to get() keys in lower case
2015-09-17 18:46:27 -07:00
Remy Sharp
3c11ef50e5 fix: env.match test
The previous test was expecting the .match value to be a function rather than a regexp which is what the README shows. So I've fixed the code to match against a real regexp, and test if the stringified version of the regexp function is [object RegExp].

I've also updated the tests to prime the process.env with values that are specifically tested for to ensure it's correctly loading the env values.

Fixex indexzero/nconf#178
2015-08-04 10:30:33 -07:00
Olivier Lalonde
8a21ef36d5 env({lowerCase:true}) option to make it possible to get() keys in lower case 2015-08-04 18:56:43 +08:00
indexzero
af0e9fb7e7 [dist fix] Cleanup some whitespace. 2014-11-26 01:31:48 -05:00
indexzero
09342555ba [fix] Fixed regression introduced by #98. 2014-11-26 01:28:31 -05:00
indexzero
f07bc40d64 [fix] Fix inconsistent style from #98. 2014-11-26 01:06:44 -05:00
joaoafrmartins
120f5f0a4b added documentation 2014-01-10 00:26:07 +00:00
joaoafrmartins
681fd2f6b4 added regexp filtering to nconf env store 2014-01-10 00:17:52 +00:00
Michael Hart
9aaafc5a22 Ugh, fixed whitespace 2012-06-21 18:05:52 +10:00
Michael Hart
3c08fad1c9 Changed to as it's more accurate 2012-06-21 18:04:37 +10:00
Michael Hart
e15f787940 Updated README and allowed a simpley syntax 2012-06-21 17:18:22 +10:00
Michael Hart
8921d0502e Added support for nested configs via env 2012-06-21 16:46:10 +10:00
Pavan Kumar Sunkara
29eb5f905d [minor] Fix whitespaces 2012-04-15 00:58:55 +05:30
indexzero
6c720ee109 [dist] Update Copyright and Author to Nodejitsu Inc. 2011-11-24 00:33:08 -05:00
indexzero
78ce55602f [minor] Dont allow .set() calls to change values in readOnly stores: argv, env, and literal 2011-11-24 00:29:35 -05:00
indexzero
c3c315d648 [refactor] Refactor to make using nconf more fluent. 2011-11-24 00:29:15 -05:00