Tweakr
    Preparing search index...

    Function pluralize

    • Returns the plural form of a word based on the provided count.

      Parameters

      • word: string

        The singular form of the word.

      • count: number

        The count to determine singular or plural form.

      Returns string

      The appropriately pluralized word.

      1.1.0

      pluralize("cat", 1); // "cat"
      pluralize("cat", 3); // "cats"
      pluralize("baby", 2); // "babies"
      pluralize("bus", 2); // "buses"