Function index

  • Equivalent to group but returns a unique value per compound key instead of an array, throwing if the key is not unique.

    Type Parameters

    • TObject

    • TKeys extends unknown[]

    Parameters

    • iterable: Iterable<TObject>

      The iterable to group.

    • Rest ...keys: {
          [Index in string | number | symbol]: ((value, index, values) => TKeys[Index])
      }

    Returns NestedInternMap<TObject, TObject, TKeys>