Function groupedBy

  • Takes an array of objects and returns an object with a property for each value in the key containing an array of all the objects that have that value.

    Type Parameters

    • T extends {}

    • K extends string | number | symbol


    • key: K

      The key to group by.

    • array: T[]

      The array of objects.

    Returns GroupedArray<T>

Generated using TypeDoc