Skip to content

Latest commit

 

History

History
34 lines (25 loc) · 682 Bytes

.verb.md

File metadata and controls

34 lines (25 loc) · 682 Bytes

Release history

v1.0.0

  • breaking changes: the .escapeDelims method was renamed to .escape
  • adds a .replace method that replaces delimiters and returns a string

Usage

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'

API

{%= apidocs("index.js") %}