jstransformer-handlebars
v1.2.0
Published
Handlebars support for JSTransformers.
Downloads
13,251
Readme
jstransformer-handlebars
Handlebars.js support for JSTransformers.
Installation
npm install jstransformer-handlebars
API
var handlebars = require('jstransformer')(require('jstransformer-handlebars'));
var locals = {
name: "World"
};
handlebars.render('<h1>Hello {{name}}!</h1>', {}, locals).body
//=> '<h1>Hello World!</h1>'
In addition to the standard Handlebars compile options, the render method can be passed objects for partials
, helpers
and decorators
(deprecated).
License
MIT