1.0.0 • Published 6 years ago
handlebars-trim v1.0.0
handlebars-trim
A handlebars helper, that removes indentations from each line.
Useful, when working with partials or layouts, where you can't use {{~#}}
Install
npm i handlebars-trim
Register the helper
const handlebars = require('handlebars');
const hbTrim = require('handlebars-trim');
handlebars.registerHelper('trim', hbTrim);
How to use
handlebars.compile('{{#trim}} <p>Does it Work?</p>{{/trim}}');
1.0.0
6 years ago