Latest Threat ResearchGlassWorm Loader Hits Open VSX via Developer Account Compromise.Details
Socket
Book a DemoInstallSign in
Socket

handlebars-helper-pluralize

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

handlebars-helper-pluralize

A Handlebars helper for conditionally pluralizing words

latest
Source
npmnpm
Version
1.0.3
Version published
Maintainers
1
Created
Source

handlebars-helper-pluralize

A Handlebars helper for conditionally pluralizing words

Installation

Download node at nodejs.org and install it, if you haven't already.

npm install handlebars-helper-pluralize --save

Usage

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.

Tests

npm install
npm test

Dependencies

  • i: custom inflections for nodejs

Dev Dependencies

  • tap: A Test-Anything-Protocol library

License

ISC

Generated by package-json-to-readme

Keywords

handlebars

FAQs

Package last updated on 11 Nov 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts