Function indexSignatureGroupByAndMap

  • Apply the given mapping function to every elements and groups all elements of the given array by the key extracted using the given indexExtractor

    Type Parameters

    • T

    • U

    Parameters

    • array: T[]

      The array to convert.

    • indexExtractor: Function1<T, string>

      The extractor function to extract a key from each element.

    • mapper: ((element) => U)

      The mapper function.

        • (element): U
        • Parameters

          • element: T

          Returns U

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

    an index signature with arrays of converted values grouped by keys.

    • [index: string]: U[]

Generated using TypeDoc