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.3 to 2.0.4

7

index.js

@@ -6,3 +6,3 @@ 'use strict';

var hasProp = Object.prototype.hasOwnProperty;
var inBrowser = typeof window === 'object';
var hasElementType = typeof Element !== 'undefined';

@@ -52,3 +52,3 @@ function equal(a, b) {

// custom handling for DOM elements
if (inBrowser && a instanceof Element && b instanceof Element)
if (hasElementType && a instanceof Element && b instanceof Element)
return a === b;

@@ -84,4 +84,3 @@

} catch (error) {
if ((error.message && error.message.match(/stack|recursion/i)) || (error.number === -2146828260))
{
if ((error.message && error.message.match(/stack|recursion/i)) || (error.number === -2146828260)) {
// warn on circular references, don't crash

@@ -88,0 +87,0 @@ // browsers give this different errors name and messages:

{
"name": "react-fast-compare",
"version": "2.0.3",
"version": "2.0.4",
"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