Socket
Socket
Sign inDemoInstall

rc-animate

Package Overview
Dependencies
15
Maintainers
3
Versions
68
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.8.2 to 2.8.3

29

es/util/diff.js

@@ -70,3 +70,32 @@ import _extends from 'babel-runtime/helpers/extends';

/**
* Merge same key when it remove and add again:
* [1 - add, 2 - keep, 1 - remove] -> [1 - keep, 2 - keep]
*/
var keys = {};
list.forEach(function (_ref) {
var key = _ref.key;
keys[key] = (keys[key] || 0) + 1;
});
var duplicatedKeys = Object.keys(keys).filter(function (key) {
return keys[key] > 1;
});
duplicatedKeys.forEach(function (matchKey) {
// Remove `STATUS_REMOVE` node.
list = list.filter(function (_ref2) {
var key = _ref2.key,
status = _ref2.status;
return key !== matchKey || status !== STATUS_REMOVE;
});
// Update `STATUS_ADD` to `STATUS_KEEP`
list.forEach(function (node) {
if (node.key === matchKey) {
node.status = STATUS_KEEP;
}
});
});
return list;
}

@@ -86,3 +86,32 @@ 'use strict';

/**
* Merge same key when it remove and add again:
* [1 - add, 2 - keep, 1 - remove] -> [1 - keep, 2 - keep]
*/
var keys = {};
list.forEach(function (_ref) {
var key = _ref.key;
keys[key] = (keys[key] || 0) + 1;
});
var duplicatedKeys = Object.keys(keys).filter(function (key) {
return keys[key] > 1;
});
duplicatedKeys.forEach(function (matchKey) {
// Remove `STATUS_REMOVE` node.
list = list.filter(function (_ref2) {
var key = _ref2.key,
status = _ref2.status;
return key !== matchKey || status !== STATUS_REMOVE;
});
// Update `STATUS_ADD` to `STATUS_KEEP`
list.forEach(function (node) {
if (node.key === matchKey) {
node.status = STATUS_KEEP;
}
});
});
return list;
}

2

package.json
{
"name": "rc-animate",
"version": "2.8.2",
"version": "2.8.3",
"description": "css-transition ui component for react",

@@ -5,0 +5,0 @@ "keywords": [

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc