$ npm install handlebars-helper-pluralizeA Handlebars helper for conditionally pluralizing words
Download node at nodejs.org and install it, if you haven't already.
npm install handlebars-helper-pluralize --save
var express = require("express")
var hbs = require("hbs")
hbs.registerHelper("pluralize", require("handlebars-helper-pluralize"))
var app = express()
app.set("view engine", "hbs")
// etc...
Use the helper in your Handlebars template:
{{#pluralize 2 pony}}
The above code will output ponies.
To include the count in the output, pass true as a third argument:
{{#pluralize 2 pony true}}
The above will output 2 ponies.
npm install
npm test
ISC
Generated by package-json-to-readme