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

anima-widget

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

anima-widget - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

5

HISTORY.md

@@ -34,1 +34,6 @@ # History

* 去掉 events,delegate 功能
## 1.1.1
* 替换anima-yocto 为anima-yocto-lite

4

package.json
{
"name": "anima-widget",
"version": "1.1.0",
"version": "1.1.1",
"description": "",

@@ -27,3 +27,3 @@ "keywords": [],

"dependencies": {
"anima-yocto": "1.0.1"
"anima-yocto-lite": "1.0.0"
},

@@ -30,0 +30,0 @@ "devDependencies": {

@@ -8,3 +8,3 @@ // Attribute

var $ = require('anima-yocto');
var $ = require('anima-yocto-lite');

@@ -34,3 +34,4 @@ // 负责 attributes 的初始化

var attr = this.attrs[key] || {};
return attr.value;
var val = attr.value;
return attr.getter ? attr.getter.call(this, val, key) : val;
};

@@ -85,4 +86,3 @@

changed[key] = [val, prev];
}
else {
} else {
this.trigger('change:' + key, val, prev, key);

@@ -153,7 +153,6 @@ }

// 只 clone 数组和 plain object,其他的保持不变
function cloneValue(value, prev){
function cloneValue(value, prev) {
if ($.isArray(value)) {
value = value.slice();
}
else if ($.isPlainObject(value)) {
} else if ($.isPlainObject(value)) {
$.isPlainObject(prev) || (prev = {});

@@ -216,2 +215,6 @@

var attr = attrs[key];
if (!isUserValue && $.isPlainObject(attr) && attr.hasOwnProperty('getter')) {
newAttrs[key] = attr;
continue;
}
newAttrs[key] = {

@@ -226,3 +229,3 @@ value: attr

// 专用于 attrs 的 merge 方法
function mergeAttrs(attrs, inheritedAttrs){
function mergeAttrs(attrs, inheritedAttrs, isUserValue) {
var key, value;

@@ -246,2 +249,8 @@ var attr;

(value['value'] !== undefined) && (attr['value'] = cloneValue(value['value'], attr['value']));
// 如果是用户赋值,只要考虑value
if (isUserValue) continue;
if (value['getter'] !== undefined) {
attr['getter'] = value['getter'];
}
}

@@ -255,3 +264,3 @@ }

function isEqual(a, b) {
if($.isPlainObject(b) || $.isArray(b)){
if ($.isPlainObject(b) || $.isArray(b)) {
return false;

@@ -258,0 +267,0 @@ }

@@ -12,3 +12,3 @@

var $ = require('anima-yocto');
var $ = require('anima-yocto-lite');

@@ -15,0 +15,0 @@ // The base Class implementation.

@@ -8,3 +8,3 @@ // Widget

var Base = require('./base');
var $ = require('anima-yocto');
var $ = require('anima-yocto-lite');

@@ -11,0 +11,0 @@ var DELEGATE_EVENT_NS = '.delegate-events-';

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