diff options
author | EuAndreh <eu@euandre.org> | 2024-03-01 15:46:25 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2024-03-01 15:46:25 -0300 |
commit | bdb10025345c5dfc1f3a4539e6367eb4af60a969 (patch) | |
tree | 2aad3d9020f75e1fbba3c48c7952203ad338ba5c /src/utils.mjs | |
parent | src/utils.mjs: Replace promisify() by util.promisify() (diff) | |
download | papod-bdb10025345c5dfc1f3a4539e6367eb4af60a969.tar.gz papod-bdb10025345c5dfc1f3a4539e6367eb4af60a969.tar.xz |
src/utils.mjs: Remove eq(), use utils.isDeepStrictEqual from "node:utils" instead
Diffstat (limited to 'src/utils.mjs')
-rw-r--r-- | src/utils.mjs | 33 |
1 files changed, 0 insertions, 33 deletions
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) => |