Pluralize a word
npm install plur
import 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.
Overall
Maintained
Code review
npm
Latest release
Releases this year
1,684 followers · starred Jun 2015
16,261 followers · starred Aug 2022
1,596 followers · starred Jun 2015
112 followers · starred May 2024
Pluralize a word
npm install plur
import 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.
Overall
Maintained
Code review
npm
Latest release
Releases this year
1,684 followers · starred Jun 2015
16,261 followers · starred Aug 2022
1,596 followers · starred Jun 2015
112 followers · starred May 2024