- breaking changes: the
.escapeDelims
method was renamed to.escape
- adds a
.replace
method that replaces delimiters and returns a string
var delimiters = require('handlebars-delimiters');
var Handlebars = require('handlebars');
/**
* Before
*/
var a = Handlebars.compile('{{ name }}<%= name %>')({name: 'Jon'});
console.log(a);
//=> 'Jon<%= name %>'
/**
* After
*/
// Pass your instance of Handlebars and define custom delimiters
delimiters(Handlebars, ['<%=', '%>']);
var b = Handlebars.compile('{{ name }}<%= name %>')({name: 'Jon'});
console.log(b);
//=> '{{ name }}Jon'
{%= apidocs("index.js") %}