The template string. 模板字符串
An object containing values to interpolate. 包含要插值的值对象
Options. 选项
Optionalprefix?: stringPrefix for placeholders. Default is '{{'. 占位符前缀,默认为 '{{'
Optionalsuffix?: stringSuffix for placeholders. Default is '}}'. 占位符后缀,默认为 '}}'
The interpolated string. 插值后的字符串
template('Hello, {{name}}!', { name: 'World' }) // => 'Hello, World!'
template('{{greeting}}, {{name}}', { greeting: 'Hi', name: 'there' }) // => 'Hi, there'
template('{{a}} + {{b}} = {{c}}', { a: 1, b: 2, c: 3 }) // => '1 + 2 + 3'
String template interpolation
字符串模板插值,支持 {{variable}} 形式的占位符