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

x/rimbu/common/comp.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@1.0.4/common/comp.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>