20 lines
357 B
JavaScript
Raw Normal View History

2017-05-14 20:17:08 -04:00
'use strict'
const _ = require('lodash')
module.exports = {
/**
* Parse configuration value for environment vars
*
* @param {any} cfg Configuration value
* @returns Parse configuration value
*/
parseConfigValue (cfg) {
return _.replace(
cfg,
2017-05-15 21:09:53 -04:00
/\$\(([A-Z0-9_]+)\)/g,
(fm, m) => { return process.env[m] }
2017-05-14 20:17:08 -04:00
)
}
}