You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Michael Winter 555e2c196e | 5 years ago | |
---|---|---|
.. | ||
index.js | 5 years ago | |
license | 5 years ago | |
package.json | 5 years ago | |
readme.md | 5 years ago |
readme.md
plur
Naively pluralize a word
Install
$ npm install --save plur
Usage
var plur = require('plur');
plur('unicorn', 4);
//=> 'unicorns'
plur('hero', 'heroes', 4);
//=> 'heroes'
API
plur(word, [plural], count)
word
Type: string
Word to pluralize.
plural
Type: string
Default: word
+ s
Pluralized word.
count
Type: number
Count to determine whether to use singular or plural.
License
MIT © Sindre Sorhus