Last Updated: February 25, 2016
·
3.936K
· ultimatedelman

Handlebars Helper for Pluralizing Words

Here's a quick Handlebars.js helper I wrote that will pluralize about 95% of words in the English language. It's not perfect by any means, but if you find edge cases you'd like to include, you can include them in the top.

It depends on jQuery and a library called String.js. Both are completely unnecessary if you want to rewrite the $.inArray() jQuery function or the functionality for .endsWith() and .chompRight() from string.js, but I was already using them in my project so I figured I'd take advantage of it :)