underscore.js template settings, set templateSettings or pass as an argument to 'template()' to override defaults.

Hierarchy

  • TemplateSettings

Properties

escape?: RegExp

Default value is '/<%-([\s\S]+?)%>/g'.

evaluate?: RegExp

Default value is '/<%([\s\S]+?)%>/g'.

interpolate?: RegExp

Default value is '/<%=([\s\S]+?)%>/g'.

variable?: string

By default, 'template()' places the values from your data in the local scope via the 'with' statement. However, you can specify a single variable name with this setting.