Function groupByFunction

  • Returns a Record with keys for each unique value of getKey

    Returns

    on objects mapping key to grouped elements

    Type Parameters

    • T extends Record<string | symbol, any>

    • TK extends string | number | symbol

    Parameters

    • list: T[]

      an array of objects

    • getKey: KeyFun<T, TK>

      a function returning the key by which to group

    Returns Record<TK, T[]>

Generated using TypeDoc