Function indexes

  • Equivalent to index, but returns nested arrays instead of nested maps.

    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])
      }

      The key functions.

    Returns NestedArray<TObject, TObject, TKeys>