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

x/windmill/node_modules/evt/tools/inDepth/same.d.ts>same

Windmill deno client (separated from the main repo because most of the code is auto-generated from the openapi and not worth committing)
Go to Latest
variable same
import { same } from "https://deno.land/x/windmill@v1.265.1/node_modules/evt/tools/inDepth/same.d.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.

type

<T>(
o1: T,
o2: T,
unnamed 2?: { takeIntoAccountArraysOrdering: boolean; },
) => boolean