Helpers for any handlebars projects. Btw, it can work without it.


View helpers for any handlebars projects. For express 3 I prefer using express-hbs and for koa — koa-hbs. Btw, all helpers can work without handlebars.

$ npm i --save hbs-helpers
const hbs = require('express-hbs');
const helpers = require('hbs-helpers');
for (let helper in helpers) {
  hbs.registerHelper(helper, helpers[helper]);
  • downsize(text[, options])
  • length(number)
  • formatdate(date[, options])
  • rusweek(date[, options])
  • formatyear(date)
  • timeago(date[, options])
  • formatmoney(number)
  • plural(count[, options])
  • rubles(number)
  • htmlescape(text)
  • urlencode(text)
  • striptags(text)

The MIT License, see the included license.md file.