You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Michael Winter 555e2c196e initial commit 5 years ago
..
irregular-plurals.json initial commit 5 years ago
license initial commit 5 years ago
package.json initial commit 5 years ago
readme.md initial commit 5 years ago

readme.md

irregular-plurals Build Status

Map of nouns to their irregular plural form

An irregular plural in this library is defined as a noun that cannot be made plural by applying these rules:

  • If the noun ends in an "s", "x", "z", "ch" or "sh", add "es"
  • If the noun ends in a "y" and is preceded by a consonant, drop the "y" and add "ies"
  • If the noun ends in a "y" and is preceded by a vowel, add "s"

The list is just a JSON file and can be used wherever.

Install

$ npm install irregular-plurals

Usage

const irregularPlurals = require('irregular-plurals');

console.log(irregularPlurals['cactus']);
//=> 'cacti'

console.log(irregularPlurals);
/*
{
	addendum: 'addenda',
	alga: 'algae',
}
*/
  • plur - Pluralize a word

License

MIT © Sindre Sorhus