1234567891011121314151617181920 |
- '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,
- (/\$\([A-Z0-9_]+\)/g,
- (m) => { return process.env[m] })
- )
- }
- }
|