ts-humanize / pluralWord
pluralWord(
quantity,singular,plural?):string
Defined in: english/words.ts:37
pluralWord builds the plural form of an English word.
The simple English rules of regular pluralization will be used if the plural arg is empty/undefined.
number
The number of things of the singular.
string
The string to to be converted.
string
The optional plural case.
string
pluralWord(1, "cat"); // returns "cat"
pluralWord(2, "cat"); // returns "cats"
pluralWord(2, "index"); // returns "indices"
pluralWord(2, "baby"); // returns "babies"