1.0.0 • Published 6 years ago

handlebars-trim v1.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

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}}');