Function: pluralize()
pluralize(
count,noun):string
Format a count with its noun, pluralizing (naive +s) unless the count is 1:
pluralize(1, "barrel") -> "1 barrel", pluralize(3, "barrel") ->
"3 barrels". Collapses the ${n} noun${n === 1 ? "" : "s"} idiom.
Parameters
Section titled “Parameters”number
string
Returns
Section titled “Returns”string