Skip to main content
Module

x/rambda/source/sort-spec.ts

Faster and smaller alternative to Ramda
Go to Latest
File
import {sort} from 'rambda'
const list = [3, 0, 5, 2, 1]
function sortFn(a: number, b: number): number { return a > b ? 1 : -1}
describe('R.sort', () => { it('happy', () => { const result = sort(sortFn, list) result // $ExpectType number[] }) it('curried', () => { const result = sort(sortFn)(list) result // $ExpectType number[] })})