Create cli-options.js
This commit is contained in:
parent
f8014e3ee0
commit
dc649320f7
1 changed files with 13 additions and 0 deletions
13
node_modules/dotenv/lib/cli-options.js
generated
vendored
Normal file
13
node_modules/dotenv/lib/cli-options.js
generated
vendored
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
/* @flow */
|
||||||
|
|
||||||
|
const re = /^dotenv_config_(encoding|path|debug)=(.+)$/
|
||||||
|
|
||||||
|
module.exports = function optionMatcher (args /*: Array<string> */) {
|
||||||
|
return args.reduce(function (acc, cur) {
|
||||||
|
const matches = cur.match(re)
|
||||||
|
if (matches) {
|
||||||
|
acc[matches[1]] = matches[2]
|
||||||
|
}
|
||||||
|
return acc
|
||||||
|
}, {})
|
||||||
|
}
|
Loading…
Reference in a new issue