handlebars-trim
v1.0.0
Published
A handlebars helper, that removes indentations from each line.
Downloads
3
Maintainers
Readme
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}}');