- count<Iter, V, T>(iter, key?): AnyItResult<Iter, Map<T, number>>
Type Parameters
- Iter extends AnyIt<unknown>
- V extends unknown
- T = V
Parameters
- iter: Iter
Optional
key: ValFunc<V, T>
Returns AnyItResult<Iter, Map<T, number>>
- A Map containing the count of each value.
Counts the number of occurrences of each value in an iterable.
Use the second parameter to get the key used to count.