Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "associate"

Index

Functions

Functions

associate

  • associate<T, K, V>(this: Sequence<T>, transform: function): Map<K, V>
  • Transforms each element into a key-value pair and returns the results as map. In case of duplicate keys the last key-value pair overrides the other.

    Type parameters

    • T

    • K

    • V

    Parameters

    • this: Sequence<T>
    • transform: function
        • (value: T): [K, V]
        • Parameters

          • value: T

          Returns [K, V]

    Returns Map<K, V>