Pluralize a word
$ npm install plur
const plur = require('plur'); plur('unicorn', 4); //=> 'unicorns' plur('puppy', 2); //=> 'puppies' plur('box', 2); //=> 'boxes' plur('cactus', 2); //=> 'cacti'
Type: string
Word to pluralize.
Type: string
Default:
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
Count to determine whether to use singular or plural.
MIT © Sindre Sorhus