Socket
Socket
Sign inDemoInstall

irregular-plurals

Package Overview
Dependencies
0
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    irregular-plurals

Map of nouns to their irregular plural form


Version published
Maintainers
1
Install size
7.10 kB
Created

Readme

Source

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 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'],
	…
}
*/
  • plur - Pluralize a word

License

MIT © Sindre Sorhus

Keywords

FAQs

Last updated on 30 Apr 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc