Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@welldone-software/why-did-you-render

Package Overview
Dependencies
Maintainers
2
Versions
111
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@welldone-software/why-did-you-render - npm Package Compare versions

Comparing version 6.0.5 to 6.1.0

49

dist/whyDidYouRender.js
/**
* @welldone-software/why-did-you-render 6.0.5
* @welldone-software/why-did-you-render 6.1.0
* MIT Licensed
* Generated by Vitali Zaidman <vzaidman@gmail.com> (https://github.com/vzaidman)
* Generated at 2020-12-30
* Generated at 2021-03-06
*/

@@ -62,2 +62,18 @@

function _typeof(obj) {
"@babel/helpers - typeof";
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
_typeof = function (obj) {
return typeof obj;
};
} else {
_typeof = function (obj) {
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
};
}
return _typeof(obj);
}
function _classCallCheck(instance, Constructor) {

@@ -526,13 +542,20 @@ if (!(instance instanceof Constructor)) {

if (lodash.isPlainObject(a) && lodash.isPlainObject(b)) {
var keys = lodash.keys(a);
var keysLength = keys.length;
if (_typeof(a) === 'object' && _typeof(b) === 'object' && Object.getPrototypeOf(a) === Object.getPrototypeOf(b)) {
var allKeys = Object.getOwnPropertyNames(a);
var clonedA = lodash.isPlainObject(a) ? _objectSpread2({}, a) : a;
var clonedB = lodash.isPlainObject(b) ? _objectSpread2({}, b) : b;
if (keysLength !== lodash.keys(b).length) {
return trackDiff(_objectSpread2({}, a), _objectSpread2({}, b), diffsAccumulator, pathString, diffTypes.different);
}
if (allKeys.length !== Object.getOwnPropertyNames(b).length) {
return trackDiff(clonedA, clonedB, diffsAccumulator, pathString, diffTypes.different);
} // Do not compare the stack as it might differ even though the errors are identical.
var relevantKeys = lodash.isError(a) ? allKeys.filter(function (k) {
return k !== 'stack';
}) : allKeys;
var keysLength = relevantKeys.length;
for (var _i = keysLength; _i--; _i > 0) {
if (!lodash.has(b, keys[_i])) {
return trackDiff(_objectSpread2({}, a), _objectSpread2({}, b), diffsAccumulator, pathString, diffTypes.different);
if (!lodash.has(b, relevantKeys[_i])) {
return trackDiff(clonedA, clonedB, diffsAccumulator, pathString, diffTypes.different);
}

@@ -545,3 +568,3 @@ }

for (var _i2 = keysLength; _i2--; _i2 > 0) {
var key = keys[_i2];
var key = relevantKeys[_i2];
var deepEquals = accumulateDeepEqualDiffs(a[key], b[key], objectValuesDiffs, "".concat(pathString, ".").concat(key), {

@@ -561,6 +584,6 @@ detailed: detailed

if (numberOfDeepEqualsObjectValues === keysLength) {
return trackDiff(_objectSpread2({}, a), _objectSpread2({}, b), diffsAccumulator, pathString, diffTypes.deepEquals);
return trackDiff(clonedA, clonedB, diffsAccumulator, pathString, diffTypes.deepEquals);
}
return trackDiff(_objectSpread2({}, a), _objectSpread2({}, b), diffsAccumulator, pathString, diffTypes.different);
return trackDiff(clonedA, clonedB, diffsAccumulator, pathString, diffTypes.different);
}

@@ -567,0 +590,0 @@

{
"name": "@welldone-software/why-did-you-render",
"version": "6.0.5",
"version": "6.1.0",
"description": "Monkey patches React to notify you about avoidable re-renders.",

@@ -5,0 +5,0 @@ "types": "types.d.ts",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc