New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@cicada/render

Package Overview
Dependencies
Maintainers
2
Versions
107
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cicada/render - npm Package Compare versions

Comparing version 1.0.0-alpha12 to 1.0.0-alpha13

33

lib/convertFragment.js

@@ -11,2 +11,6 @@ 'use strict';

var _typeof2 = require('babel-runtime/helpers/typeof');
var _typeof3 = _interopRequireDefault(_typeof2);
var _extends2 = require('babel-runtime/helpers/extends');

@@ -16,6 +20,2 @@

var _typeof2 = require('babel-runtime/helpers/typeof');
var _typeof3 = _interopRequireDefault(_typeof2);
exports.default = convertFragment;

@@ -69,15 +69,2 @@

function strictType(a) {
return (typeof a === 'undefined' ? 'undefined' : (0, _typeof3.default)(a)) !== 'object' ? typeof a === 'undefined' ? 'undefined' : (0, _typeof3.default)(a) : Array.isArray(a) ? 'array' : 'object';
}
function partialDeepEqual(a, b) {
if (strictType(a) !== strictType(b)) return false;
if (!(0, _util.isObject)(a)) return a === b;
return (0, _util.every)(a, function (v, k) {
return partialDeepEqual(v, b[k]);
});
}
function computeFrom(linkState, utilInstances) {

@@ -92,9 +79,7 @@ return (0, _util.mapValues)(linkState, function (_ref) {

function computeTo(linkState, state, utilInstances) {
var recomputed = {};
(0, _util.each)(linkState, function (_ref2, name) {
var to = _ref2.to;
recomputed = (0, _extends3.default)({}, to((0, _extends3.default)({ value: state[name], state: state }, utilInstances)));
to((0, _extends3.default)({ value: state[name], state: state }, utilInstances));
});
return recomputed;
}

@@ -224,9 +209,3 @@

// CAUTION 注意,这里只针对外部引起的变化进行来重新内部render
var stateTree = instance.stateTree;
var newInner = computeTo(linkState, state, instance.background.instances);
(0, _util.each)(newInner, function (newState, statePath) {
if (!partialDeepEqual(newState, stateTree.get(statePath))) {
stateTree.merge(statePath, newState, { type: _constant.REASON_COMPONENT_RECEIVE_STATE });
}
});
computeTo(linkState, state, instance.background.instances);
};

@@ -233,0 +212,0 @@

2

package.json
{
"name": "@cicada/render",
"version": "1.0.0-alpha12",
"version": "1.0.0-alpha13",
"main": "./lib/index.js",

@@ -5,0 +5,0 @@ "scripts": {

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