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

x/rambda/mod.ts>sortBy

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

It returns copy of list sorted by sortFn function, where sortFn function returns a value to compare, i.e. it doesn't need to return only -1, 0 or 1.

Parameters

sortFn: (a: T) => Ord
list: T[]

Parameters

sortFn: (a: T) => Ord

Returns

(list: T[]) => T[]

Parameters

sortFn: (a: any) => Ord

Returns

<T>(list: T[]) => T[]