package
Pluralize a word
npm install plurGitHub-flavored package documentation.
Across all versions, last 30 days.
11,503,582 in 30 days
Runtime metadata.
Tagged topics.
Pluralize a word
npm install plurimport plur from 'plur';
plur('rainbow');
//=> 'rainbows'
plur('unicorn', 4);
//=> 'unicorns'
plur('puppy', 2);
//=> 'puppies'
plur('box', 2);
//=> 'boxes'
plur('cactus', 2);
//=> 'cacti'Type: string
The word to pluralize.
Type: string
Default:
Explicitly provide the pluralized word.
The plural suffix will match the case of the last letter in the word.
This option is only for extreme edge-cases. You probably won't need it.
Type: number
The count to determine whether to use singular or plural. If omitted, defaults to plural.
Estimated unpacked size across 2 packages.
17.7 kB
Includes dependencies.