npm

Need private packages and team management tools?Check out npm Orgs. »

@nathanfaucett/singularize

0.0.1 • Public • Published

singularize

singularize words, uses global inflector from inflections @nathanfaucett/inflections

var singularize = require("@nathanfaucett/singularize"),
    inflections = require("@nathanfaucett/inflections");
 
 
var en = inflections("en");
 
en.singular(/s$/i, "");
en.singular(/(ch|sh|ss|[sxz])es$/i, "$1");
en.singular(/([^aeiouy])ies$/i, "$1y");
 
singularize("words") === "word";
singularize("skies") === "sky";
singularize("boxes") === "box";

install

npm i @nathanfaucett/singularize

Downloadsweekly downloads

4

version

0.0.1

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability