Skip to main content
Module

x/core_fn/dev_deps.ts>equal

A collection of built-in object method and property as currying function
Latest
variable equal
import { equal } from "https://deno.land/x/core_fn@v1.0.0-beta.16/dev_deps.ts";

Returns true if its arguments are equivalent, otherwise false. Handles cyclical data structures.

Examples

Example 1

equals(-0, 0) // true
equals(NaN, NaN) // true
equals([[[[]]]], [[[[]]]]) // true
equals({ a: { b: [1, 2, 3]}}, { a: { b: [1, 2, 3]}}) // true

type

<T, U extends T>(a: T, b: U) => boolean