@ailabs/fast-deep-equal
Advanced tools
Comparing version 3.1.1 to 3.2.1
@@ -49,2 +49,4 @@ 'use strict'; | ||
keys = Object.getOwnPropertySymbols(a); | ||
@@ -58,4 +60,4 @@ length = keys.length; | ||
for (i = length; i-- !== 0;) { | ||
var key = keys[i]; | ||
if (!equal(a[key], b[key])) return false; | ||
var sk = keys[i]; | ||
if (!equal(a[sk], b[sk])) return false; | ||
} | ||
@@ -62,0 +64,0 @@ |
@@ -49,2 +49,4 @@ 'use strict'; | ||
keys = Object.getOwnPropertySymbols(a); | ||
@@ -58,4 +60,4 @@ length = keys.length; | ||
for (i = length; i-- !== 0;) { | ||
var key = keys[i]; | ||
if (!equal(a[key], b[key])) return false; | ||
var sk = keys[i]; | ||
if (!equal(a[sk], b[sk])) return false; | ||
} | ||
@@ -62,0 +64,0 @@ |
@@ -24,2 +24,4 @@ 'use strict'; | ||
if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags; | ||
@@ -26,0 +28,0 @@ if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf(); |
{ | ||
"name": "@ailabs/fast-deep-equal", | ||
"version": "3.1.1", | ||
"version": "3.2.1", | ||
"description": "Fast deep equal", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
14
react.js
@@ -24,2 +24,16 @@ 'use strict'; | ||
keys = Object.getOwnPropertySymbols(a); | ||
length = keys.length; | ||
if (length !== Object.getOwnPropertySymbols(b).length) return false; | ||
for (i = length; i-- !== 0;) | ||
if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false; | ||
for (i = length; i-- !== 0;) { | ||
var sk = keys[i]; | ||
if (!equal(a[sk], b[sk])) return false; | ||
} | ||
if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags; | ||
@@ -26,0 +40,0 @@ if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf(); |
14080
217