export function templateValue ( value , envs ) ; export function templateValue ( value , envs ) ; export function templateValue ( value , envs ) { if ( ! value || ! envs ) { return value ; } let result = value ; for ( const key of Object . keys ( envs ) ) { const envValue = envs [ key ] ; result = result . replace ( new RegExp ( `\\$${ key }` , 'gi' ) , envValue ) ; } return result ; }