dominictarr / rc

The non-configurable configuration loader for lazy people.
Other
1.02k stars 97 forks source link

non-lowercase prefixes in env vars don't work #91

Closed rschick closed 7 years ago

rschick commented 7 years ago

This change broke non-lowercase prefixes: https://github.com/dominictarr/rc/commit/b6c3d228dd706fc464d5e24dc4b3f95b9460a2ee

If prefix contains upper case characters, env vars won't load. For example the assertion below will fail but it should succeed:

process.env['CONF_key'] = 'value';
var conf = require('rc')('CONF');
assert.equal(conf.key, 'value'); // should succeed, but fails