@trashpanda001/helpers
    Preparing search index...

    Function countable

    • Pluralize / count something in English.

      Parameters

      • count: number

        the number of items

      • singular: string

        the singular form of the item

      • plural: string = ...

        the plural form of the item (default: singular + "s")

      Returns string

      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")