$ npm install plur
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.
© 2010 - cnpmjs.org x YWFE | Home | YWFE