Skip to content

Commit

Permalink
ignore case of prefix for env keys
Browse files Browse the repository at this point in the history
  • Loading branch information
nw committed Jan 26, 2016
1 parent 132062d commit 6ec6975
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@ var env = exports.env = function (prefix, env) {
env = env || process.env
var obj = {}
var l = prefix.length
var regex = new RegExp("^"+prefix, "i");
for(var k in env) {
if((k.indexOf(prefix)) === 0) {
if(regex.test(k)) {

var keypath = k.substring(l).split('__')

Expand Down

0 comments on commit 6ec6975

Please sign in to comment.