Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/willow/mod.deno.ts>compareTwoKeyParts

Exploring Willow in the most efficient and sound programming language
Go to Latest
function compareTwoKeyParts
import { compareTwoKeyParts } from "https://deno.land/x/willow@0.2.1/mod.deno.ts";

The ordering on KeyParts. Uint8Arrays are less than strings are less than numbers are less than booleans. Amongst themselves, Uint8Arrays are compared lexicographically, strings use the js < and > operators, numbers use the js < and > operators, and booleans use the js < and > operators.

Returns

number

A negative number if a is less than b, zero if a equals b, a positive number if a is greater than b.