lib/cli/plugins/init.js
function replace_env_values(val_in) {
  if (!val_in)
    return ""

  let val_out = val_in

  const matches = val_in.match(/\$\w+/g)
    
  if (matches)
    matches.forEach(env => {
      const value = process.env[env.substring(1, env.length)]
    val_out = value.replace(new RegExp(`${env}`, "g"), value) // eslint-disable-line
    })

  return val_out
}
function replace_env_values(val_in) {
  if (!val_in)
    return ""

  let val_out = val_in

  const matches = val_in.match(/\$\w+/g)
    
  if (matches)
    matches.forEach(env => {
      const value = process.env[env.substring(1, env.length)]
    val_out = value.replace(new RegExp(`${env}`, "g"), value) // eslint-disable-line
    })

  return val_out
}
function replace_env_values ( val_in ) { if ( ! val_in ) return "" let val_out = val_in const matches = val_in . match ( / \$\w+ / g ) if ( matches ) matches . forEach ( env => { const value = process . env [ env . substring ( 1 , env . length ) ] val_out = value . replace ( new RegExp ( ` ${ env } ` , "g" ) , value ) // eslint-disable-line } ) return val_out }
Replace any environmentals that appear in the
string.
@param  {string} val_in to do replace on.
@return {string} String with replacements done.
Replace any environmentals that appear in the string .