You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

@leafer/display-module

Package Overview
Dependencies
Maintainers
1
Versions
116
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@leafer/display-module - npm Package Compare versions

Comparing version
1.8.0
to
1.9.0
+7
-6
package.json
{
"name": "@leafer/display-module",
"version": "1.8.0",
"version": "1.9.0",
"description": "@leafer/display-module",

@@ -25,10 +25,11 @@ "author": "Chao (Leafer) Wan",

"dependencies": {
"@leafer/helper": "1.8.0",
"@leafer/event": "1.8.0",
"@leafer/math": "1.8.0",
"@leafer/debug": "1.8.0"
"@leafer/helper": "1.9.0",
"@leafer/event": "1.9.0",
"@leafer/math": "1.9.0",
"@leafer/data": "1.9.0",
"@leafer/debug": "1.9.0"
},
"devDependencies": {
"@leafer/interface": "1.8.0"
"@leafer/interface": "1.9.0"
}
}
import { ILeafDataProxyModule, IObject, IValue } from '@leafer/interface'
import { PropertyEvent } from '@leafer/event'
import { PropertyEvent, LeaferEvent, leaferTransformAttrMap } from '@leafer/event'
import { isObject, isFinite, isUndefined } from '@leafer/data'
import { Debug } from '@leafer/debug'
const { isFinite } = Number
const debug = Debug.get('setAttr')

@@ -16,3 +16,3 @@

if (checkFiniteNumber && !isFinite(newValue) && newValue !== undefined) { // 警告 NaN、Infinity、-Infinity、null、非有效数字
if (checkFiniteNumber && !isFinite(newValue) && !isUndefined(newValue)) { // 警告 NaN、Infinity、-Infinity、null、非有效数字
debug.warn(this.innerName, name, newValue)

@@ -22,3 +22,3 @@ newValue = undefined // must

if (typeof newValue === 'object' || oldValue !== newValue) {
if (isObject(newValue) || oldValue !== newValue) {

@@ -32,2 +32,7 @@ this.__realSetAttr(name, newValue)

this.emitEvent(new PropertyEvent(PropertyEvent.LEAFER_CHANGE, this, name, oldValue, newValue))
const transformEventName = leaferTransformAttrMap[name]
if (transformEventName) {
this.emitEvent(new LeaferEvent(transformEventName, this))
this.emitEvent(new LeaferEvent(LeaferEvent.TRANSFORM, this))
}
} else {

@@ -57,3 +62,3 @@ if (this.hasEvent(CHANGE)) this.emitEvent(event)

if (this.__proxyData) this.setProxyAttr(name, newValue)
if (data.normalStyle) this.lockNormalStyle || data.normalStyle[name] === undefined || (data.normalStyle[name] = newValue)
if (data.normalStyle) this.lockNormalStyle || isUndefined(data.normalStyle[name]) || (data.normalStyle[name] = newValue)
},

@@ -60,0 +65,0 @@