Skip to content

A handlebars helper, that removes indentations from the start of each line.

License

Notifications You must be signed in to change notification settings

kevgk/handlebars-trim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A handlebars helper, that removes indentations from the start of each line.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published