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

x/rimbu/common/index.ts>Comp.numberComp

Rimbu is a TypeScript library focused on immutable, performant, and type-safe collections and other tools.
Go to Latest
function Comp.numberComp
import { Comp } from "https://deno.land/x/rimbu@0.13.0/common/index.ts";
const { numberComp } = Comp;

Returns a default number Comp instance that orders numbers naturally.

Examples

Example 1

const c = Comp.numberComp();
console.log(c.compare(3, 5))
// => -2

Returns

Comp<number>