From bdb10025345c5dfc1f3a4539e6367eb4af60a969 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Fri, 1 Mar 2024 15:46:25 -0300 Subject: src/utils.mjs: Remove eq(), use utils.isDeepStrictEqual from "node:utils" instead --- src/utils.mjs | 33 --------------------------------- 1 file changed, 33 deletions(-) (limited to 'src') diff --git a/src/utils.mjs b/src/utils.mjs index ca4e4fc..cb0c116 100644 --- a/src/utils.mjs +++ b/src/utils.mjs @@ -1,36 +1,3 @@ -export const eq = (a, b) => { - if (a === b) { - return true; - } - - if (a === null || b === null) { - return false; - } - - if (typeof a != "object" || typeof b != "object") { - return false; - } - - if (Array.isArray(a) !== Array.isArray(b)) { - return false; - } - - if (Object.keys(a).length !== Object.keys(b).length) { - return false; - } - - for (const k in a) { - if (!b.hasOwnProperty(k)) { - return false; - } - if (!eq(a[k], b[k])) { - return false; - } - } - - return true; -}; - export const keys = (ks, obj) => ks.reduce( (ret, k) => -- cgit v1.2.3