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

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

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

Returns a default boolean Comp instance that orders booleans according to false < true.

Examples

Example 1

const c = Comp.booleanComp();
console.log(c.compare(false, true) < 0)
// => true
console.log(c.compare(true, true))
// => 0

Returns

Comp<boolean>