Socket
Socket
Sign inDemoInstall

react-fast-compare

Package Overview
Dependencies
0
Maintainers
29
Versions
15
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

2

package.json
{
"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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc