Returns the singular or plural form of a word based on count. If plural is not provided, appends "s" to singular.
count
plural
"s"
singular
The quantity.
Singular form of the word.
Optional
Optional plural form. Defaults to singular + "s".
singular + "s"
formatPlural(1, "item") // => "item"formatPlural(3, "item") // => "items"formatPlural(2, "person", "people") // => "people" Copy
formatPlural(1, "item") // => "item"formatPlural(3, "item") // => "items"formatPlural(2, "person", "people") // => "people"
Returns the singular or plural form of a word based on
count. Ifpluralis not provided, appends"s"tosingular.