diff options
Diffstat (limited to 'src')
-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) => |