Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/rambda/mod.ts>countBy

Faster and smaller alternative to Ramda
Latest
function countBy
import { countBy } from "https://deno.land/x/rambda@9.4.1/mod.ts";

It counts elements in a list after each instance of the input list is passed through transformFn function.

Type Parameters

T extends unknown

Parameters

transformFn: (x: T) => any
list: T[]

Returns

Record<string, number>

Type Parameters

T extends unknown

Parameters

transformFn: (x: T) => any

Returns

(list: T[]) => Record<string, number>