Pluralize / count something in English.
the number of items
the singular form of the item
the plural form of the item (default: singular + "s")
singular + "s"
the string with the count and the singular or plural form
import { countable } from "@trashpanda001/helpers/string"countable(1, "cat")// "1 cat"countable(2, "cat")// "2 cats"countable(2, "cat", "felines") Copy
import { countable } from "@trashpanda001/helpers/string"countable(1, "cat")// "1 cat"countable(2, "cat")// "2 cats"countable(2, "cat", "felines")
Pluralize / count something in English.