1.0.2 • Published 1 year ago

pluralize-it v1.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

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'