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

x/rambda/mod.ts>groupBy

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

It splits list according to a provided groupFn function and returns an object.

Parameters

groupFn: (x: T) => string
list: T[]

Returns

{ [index: string]: T[]; }

Parameters

groupFn: (x: T) => string

Returns

(list: T[]) => { [index: string]: T[]; }

Parameters

groupFn: (x: T) => string
list: T[]

Parameters

groupFn: (x: T) => string

Returns

(list: T[]) => U