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

cm-web-modules

Package Overview
Dependencies
Maintainers
1
Versions
146
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cm-web-modules - npm Package Compare versions

Comparing version 1.11.8 to 1.11.9

test/TestObserve.js

2

package.json
{
"name": "cm-web-modules",
"version": "1.11.8",
"version": "1.11.9",
"description": "Collection of clean and small ES6 modules for the web",

@@ -5,0 +5,0 @@ "main": "src/LibraryManager.js",

@@ -160,3 +160,3 @@ /**

const property = object[propertyName]
let mutationMethods = null
let mutationMethods = []
if (property instanceof Array) {

@@ -172,20 +172,3 @@ isCollection = true

}
if (isCollection) { // handling for Collections
mutationMethods.forEach(function (methodName) {
object[propertyName][methodName] = function () {
// object[propertyName].constructor.prototype[methodName] is Array or Set or...
object[propertyName].constructor.prototype[methodName].apply(this, arguments)
const methodArguments = arguments
registryObject.observedProperties.get(propertyName).observers.forEach(function (observer) {
const params = {
propertyName: propertyName,
methodName: methodName,
arguments: methodArguments,
newValue: object[propertyName]
}
observer(params)
})
}
})
} else if (delete object[propertyName]) { // handling for simple properties
if (delete object[propertyName]) { // handling for simple properties
Object.defineProperty(object, propertyName, {

@@ -208,2 +191,21 @@ get: function () {

})
if (isCollection) { // handling for Collections
mutationMethods.forEach(function (methodName) {
object[propertyName][methodName] = function () {
// object[propertyName].constructor.prototype[methodName] is Array or Set or...
// noinspection JSPotentiallyInvalidConstructorUsage
object[propertyName].constructor.prototype[methodName].apply(this, arguments)
const methodArguments = arguments
registryObject.observedProperties.get(propertyName).observers.forEach(function (observer) {
const params = {
propertyName: propertyName,
methodName: methodName,
arguments: methodArguments,
newValue: object[propertyName]
}
observer(params)
})
}
})
}
} else {

@@ -210,0 +212,0 @@ console.error("Error: Observe.property", propertyName, "failed")

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