Function groupBy

  • Groups the collection into sets by the returned key

    Parameters

    • collection: unknown[]
    • keyFn: Callback

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

    • hashFunction: HashFunction = DEFAULT_HASH_FUNCTION

    Returns Map<Any, Any[]>