Skip to content

Navigation Menu

Sign in
Sign up

Latest commit

History

60 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Helpers

NPM version Dependency Status devDependency Status

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.

Installation

$ npm i --save hbs-helpers

Configure for express-hbs

const hbs = require('express-hbs');
const helpers = require('hbs-helpers');
for (let helper in helpers) {
 hbs.registerHelper(helper, helpers[helper]);
}

Helpers

  • 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)

Author

License

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

About

View helpers (for the handlebars or without)

Resources

Stars

6 stars

Watchers

4 watching

Forks

Releases

Packages

Used by

Contributors

Languages

AltStyle によって変換されたページ (->オリジナル) /