Skip to main content
Module

x/collections/common.ts>count

Collection data structures that are not standard built-in objects in JavaScript. This includes a vector (double-ended queue), binary heap (priority queue), binary search tree, and a red black tree.
Very Popular
Go to Latest
function count
import { count } from "https://deno.land/x/collections@v0.10.1/common.ts";

Counts the number of occurances for each value.

Parameters

arr: Iterable<T>

Returns

Map<T, number>