Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

on-change

Package Overview
Dependencies
Maintainers
2
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

on-change - npm Package Compare versions

Comparing version 2.2.0 to 2.2.1

23

index.js

@@ -48,2 +48,10 @@ 'use strict';

const getProxyTarget = value => {
if (value) {
return value[proxyTarget] || value;
}
return value;
};
const handler = {

@@ -85,10 +93,4 @@ get(target, property, receiver) {

set(target, property, value, receiver) {
if (value) {
const valueProxyTarget = value[proxyTarget];
value = getProxyTarget(value);
if (valueProxyTarget !== undefined) {
value = valueProxyTarget;
}
}
const reflectTarget = target[proxyTarget] || target;

@@ -146,2 +148,3 @@ const previous = reflectTarget[property];

const applyPath = path.initial(cache.getPath(target));
const isHandledMethod = SmartClone.isHandledMethod(thisProxyTarget, target.name);

@@ -153,3 +156,5 @@ smartClone.start(thisProxyTarget, applyPath, argumentsList);

smartClone.preferredThisArg(target, thisArg, thisProxyTarget),
argumentsList
isHandledMethod ?
argumentsList.map(argument => getProxyTarget(argument)) :
argumentsList
);

@@ -168,3 +173,3 @@

return (SmartClone.isHandledType(result) && SmartClone.isHandledMethod(thisProxyTarget, target.name)) ?
return (SmartClone.isHandledType(result) && isHandledMethod) ?
cache.getProxy(result, applyPath, handler) :

@@ -171,0 +176,0 @@ result;

{
"name": "on-change",
"version": "2.2.0",
"version": "2.2.1",
"description": "Watch an object or array for changes",

@@ -5,0 +5,0 @@ "license": "MIT",

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