Function groupBy

  • Groups the collection into sets by the returned key

    Parameters

    • collection: unknown[]
    • keyFn: Callback<unknown, unknown>

      {Function} to compute the group key of an item in the collection

    • hashFunction: HashFunction = DEFAULT_HASH_FUNCTION

    Returns GroupByOutput