82b773a33bea535c806f0f25341b5ef6f5de23cbf639f945d76466cda52c7099fb38afdc61e4e3c6c77fd2b3710c530797c2bcf681247e5fda9b3378650691 303 B

12345678910111213
  1. /* @flow */
  2. const re = /^dotenv_config_(encoding|path|debug)=(.+)$/
  3. module.exports = function optionMatcher (args /*: Array<string> */) {
  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. }