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

x/ayonli_jsext/index.ts>Comparable

A JavaScript extension package for building strong and modern applications.
Latest
interface Comparable
import { type Comparable } from "https://deno.land/x/ayonli_jsext@v0.9.72/index.ts";

The Comparable interface is used to compare an object of the same class with an instance of that class, it provides ordering of data for objects of the user-defined class.

This interface is inspired by Java's Comparable interface.

Methods

compareTo(other: this): -1 | 0 | 1

Compares this object with another object for order. Returns -1 if this object is less than the other object, 0 if they are equal, and 1 if this object is greater than the other object.