@nathanfaucett/pluralize
v0.0.1
Published
pluralize words, uses global inflector from inflections @nathanfaucett/inflections
Downloads
8
Readme
pluralize
pluralize words, uses global inflector from inflections @nathanfaucett/inflections
var pluralize = require("@nathanfaucett/pluralize"),
inflections = require("@nathanfaucett/inflections");
var en = inflections("en");
en.plural(/$/, "s");
en.plural(/(ch|sh|ss|[sxz])$/i, "$1es");
en.plural(/([^aeiouy])y$/i, "$1ies");
pluralize("word") === "words";
pluralize("sky") === "skies";
pluralize("box", "en") === "boxes";