irregular-plurals
TypeScript icon, indicating that this package has built-in type declarations

3.5.0 • Public • Published

irregular-plurals

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 anywhere.

Install

$ npm install irregular-plurals

Usage

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

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

console.log(irregularPlurals);
/*
Map {
	[addendum, 'addenda'],
	[alga, 'algae'],

}
*/

Related

  • plur - Pluralize a word

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 3.5.0
    517,926
    • latest

Version History

Package Sidebar

Install

npm i irregular-plurals

Weekly Downloads

1,310,208

Version

3.5.0

License

MIT

Unpacked Size

6.92 kB

Total Files

6

Last publish

Collaborators

  • sindresorhus