Function indexSignatureGroupBy

  • Groups all elements of the given array by the key extracted using the given indexExtractor.

    Type Parameters

    • T

    Parameters

    • array: T[]

      The array to convert.

    • indexExtractor: Function1<T, string>

      The extractor function to extract a key from each element.

    Returns {
        [index: string]: T[];
    }

    an index signature with arrays of values grouped by keys.

    • [index: string]: T[]

Generated using TypeDoc