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

x/evt/tools/inDepth/index.ts>same

💧EventEmitter's typesafe replacement
Go to Latest
variable same
import { same } from "https://deno.land/x/evt@v2.5.3/tools/inDepth/index.ts";

Function that perform a in depth comparison of two things of arbitrary type T to see if they represent the same date regardless of object references.

Think of it as JSON.stringify(o1) === JSON.stringify(o2) but unlike a test performed with JSON.stringify the order in the property have been assigned to an object does not matter and circular references are supported.

If takeIntoAccountArraysOrdering === false then representsSameData(["a", "b"], ["b", "a"]) will return true.

If Date are compared via .getTime()

The objects can includes Map and Set.