Update pluralize.md

This commit is contained in:
atomiks
2018-01-04 03:08:08 +11:00
committed by GitHub
parent 20bb614218
commit 940ab10c84

View File

@ -1,6 +1,6 @@
### pluralize
Returns the singular or plural form of the word based on the input number. If the first argument is an `object`, it will use a closure by returning a function that can auto-pluralize plurals that don't simply end in `s` if the supplied dictionary contains the word.
Returns the singular or plural form of the word based on the input number. If the first argument is an `object`, it will use a closure by returning a function that can auto-pluralize words that don't simply end in `s` if the supplied dictionary contains the word.
If `num` is either `-1` or `1`, return the singular form of the word. If `num` is any other number, return the plural form. Omit the third argument to use the default of the singular word + `s`, or supply a custom pluralized word when necessary. If the first argument is an `object`, utilize a closure by returning a function which can use the supplied dictionary to resolve the correct plural form of the word.