pluralize-it

1.0.2 • Public • Published

pluralize-it

Pluralize a single word

Install

npm install pluralize-it

API

plur(word)

word

Type: string

The word to pluralize.

plural

Type: string
Default:

  • Irregular nouns will use this list.
  • Words ending in s, x, z, ch, sh will be pluralized with -es (eg. foxes).
  • Words ending in y that are preceded by a consonant will be pluralized by replacing y with -ies (eg. puppies).
  • All other words will have "s" added to the end (eg. days).

Explicitly provide the pluralized word. The plural suffix will match the case of the last letter in the word.

Usage

import pluralize from "pluralize-it";

pluralize("apple");
> 'rainbows'

pluralize("ALUMNUS");
> 'ALUMNI'

Package Sidebar

Install

npm i pluralize-it

Weekly Downloads

5

Version

1.0.2

License

ISC

Unpacked Size

7.63 kB

Total Files

5

Last publish

Collaborators

  • alexprabhat