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

x/rimbu/core/main/index.ts>Eq

Rimbu is a TypeScript library focused on immutable, performant, and type-safe collections and other tools.
Go to Latest
namespace Eq
Re-export
import { Eq } from "https://deno.land/x/rimbu@0.13.5/core/main/index.ts";

Variables

An Eq instance that uses Object.is to determine if two objects are equal.

Functions

Returns an Eq instance that checks equality of any values. For composed values (objects and iterables) it will recursively compare the contained values.

Returns an Eq instance that checks equality of any values. For composed values (objects and iterables) it will compare with Object.is.

Returns an Eq instance that considers values equal their JSON.stringify values are equal.

Returns an Eq instance that checks equality of any values. For composed values (objects and iterables) it will enter 1 level, and if again compound values are found, they are compared with Object.is.

Returns an Eq instance that considers strings equal taking the given or default locale into account.

Returns an Eq instance that compares Date objects according to their valueOf value.

Returns the default Eq instance, which is the Eq.anyDeepEq() instance.

Returns an Eq instance that compares Iterables by comparing their elements with the given itemEq Eq instance.

Returns an Eq instance that checks equality of objects containing property values of type V by iteratively applying given valueEq to each of the object's property values.

Returns an Eq instance that considers strings equal regardless of their case.

Returns an Eq instance that considers strings equal when all their charcodes are equal.

Returns an Eq instance for tuples that considers two tuples [A, B] and [C, D] equal if [A, B] equals [C, D], or if [A, B] equals [D, C]

Returns an Eq instance for objects that have a valueOf method. It returns true if the .valueOf values of both given objects are equal.

type alias Eq
Re-export
import { type Eq } from "https://deno.land/x/rimbu@0.13.5/core/main/index.ts";

A function returning true if given v1 and v2 should be considered equal.

definition: (v1: T, v2: T) => boolean