Get the correct phrase for an unknown number of items. Ex. "1 item" vs. "2 items"
const roomQuantity = 1pluralize(roomQuantity, 'room', 'rooms') // returns '1 room' Copy
const roomQuantity = 1pluralize(roomQuantity, 'room', 'rooms') // returns '1 room'
The number of items (typically a variable, not an actual value)
Word for a single item
Word for a group of items (or no items)
Phrase with the count followed by the correct noun
Get the correct phrase for an unknown number of items. Ex. "1 item" vs. "2 items"
Example