Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "dictionary/to-dictionary"

Index

Functions

Functions

toDictionary

  • toDictionary<T>(items: T[], getKey: (item: T) => string): Dictionary<T>
  • Maps a flat list to a dictionary.

    Type parameters

    • T

    Parameters

    • items: T[]

      The items to map.

    • getKey: (item: T) => string

      The callback to retrieve the key from an item.

        • (item: T): string
        • Parameters

          • item: T

          Returns string

    Returns Dictionary<T>

Generated using TypeDoc