Skip to main content
Module

x/rambda/immutable.d.ts>sortBy

Faster and smaller alternative to Ramda
Go to Latest
function sortBy
import { sortBy } from "https://deno.land/x/rambda@v7.0.1/immutable.d.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: readonly T[]

Returns

readonly T[]

Parameters

sortFn: (a: T) => Ord

Returns

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

Parameters

sortFn: (a: any) => Ord

Returns

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