The template string
An object with the key/value pairs to fill out the template with.
Optional. Default false
. Determines what to return if not all placeholder values are
given in the object. If false
, returns undefined
. If true
, returns a string with some placeholders not replaced;
still in their ${...}
form.
Resolves a string template with placeholders on the form ${name}
with the values given in an object.
E.g. resolveTemplate('Hello ${subject}', {subject: 'world'})
yields 'Hello world'
.
The template string
An object with the key/value pairs to fill out the template with.
Optional. Default false
. Determines what to return if not all placeholder values are
given in the object. If false
, returns undefined
. If true
, returns a string with some placeholders not replaced;
still in their ${...}
form.
Resolves a string template with placeholders on the form
${name}
with the values given in an object. E.g.resolveTemplate('Hello ${subject}', {subject: 'world'})
yields'Hello world'
.