Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "associateBy"

Index

Functions

Functions

associateBy

  • associateBy<T, K, V>(this: Sequence<T>, keySelector: function, valueTransform?: undefined | function): Map<K, V | T>
  • Returns a map consisting of the elements mapped by the given keySelector. The value can optionally be transformed into another value by specifying a valueTransformer.

    Type parameters

    • T

    • K

    • V

    Parameters

    • this: Sequence<T>
    • keySelector: function
        • (value: T): K
        • Parameters

          • value: T

          Returns K

    • Optional valueTransform: undefined | function

    Returns Map<K, V | T>