|
5 年之前 | |
---|---|---|
.. | ||
index.d.ts | 5 年之前 | |
index.js | 5 年之前 | |
license | 5 年之前 | |
package.json | 5 年之前 | |
readme.md | 5 年之前 |
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