1 | const re = /^dotenv_config_(encoding|path|debug|override|DOTENV_KEY)=(.+)$/
|
2 |
|
3 | module.exports = function optionMatcher (args) {
|
4 | return args.reduce(function (acc, cur) {
|
5 | const matches = cur.match(re)
|
6 | if (matches) {
|
7 | acc[matches[1]] = matches[2]
|
8 | }
|
9 | return acc
|
10 | }, {})
|
11 | }
|