react-fast-compare
Advanced tools
Comparing version 2.0.2 to 2.0.3
11
index.js
@@ -6,2 +6,3 @@ 'use strict'; | ||
var hasProp = Object.prototype.hasOwnProperty; | ||
var inBrowser = typeof window === 'object'; | ||
@@ -49,3 +50,8 @@ function equal(a, b) { | ||
// Custom handling for React | ||
// start react-fast-compare | ||
// custom handling for DOM elements | ||
if (inBrowser && a instanceof Element && b instanceof Element) | ||
return a === b; | ||
// custom handling for React | ||
for (i = length; i-- !== 0;) { | ||
@@ -64,2 +70,3 @@ key = keys[i]; | ||
} | ||
// end react-fast-compare | ||
@@ -70,3 +77,3 @@ // fast-deep-equal index.js 2.0.1 | ||
return a!==a && b!==b; | ||
return a !== a && b !== b; | ||
} | ||
@@ -73,0 +80,0 @@ // end fast-deep-equal |
{ | ||
"name": "react-fast-compare", | ||
"version": "2.0.2", | ||
"version": "2.0.3", | ||
"description": "Fastest deep equal comparison for React. Perfect for shouldComponentUpdate. Also really fast general-purpose deep comparison", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
11464
84