templateVariables
Function: templateVariables()
templateVariables(
object,replacements?):any
Defined in: packages/core/src/templates/templates.ts:83
Allow variable inside object strings
Example
replaceVariables({
myobj: "${test.replace}"
}, {
test: {
replace: 'plop'
}
})
will return
{
myobj: 'plop'
}
By default the replacements map contains
{
git: GitInformation,
package: 'package.json content',
deployment: string,
now: number,
...replacements
}
See: GitInformation
Parameters
object
any
a duplicated object with replacement done
replacements?
any = {}
additional replacements to run
Returns
any
the result