Module

x/rambda/rambda.js>countBy

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

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>