Function rollup

  • Groups and reduces the specified array of values into an InternMap from key to value.

    Type Parameters

    • TObject

    • TReduce

    • TKeys extends unknown[]

    Parameters

    • iterable: Iterable<TObject>

      The iterable to group.

    • reduce: ((values) => TReduce)

      The reduce function.

        • (values): TReduce
        • Parameters

          • values: TObject[]

          Returns TReduce

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

      The key functions.

    Returns NestedInternMap<TObject, TReduce, TKeys>