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

on-change

Package Overview
Dependencies
Maintainers
1
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 1.4.0 to 1.5.0

10

index.js

@@ -47,5 +47,4 @@ 'use strict';

const proxyTarget = Symbol('ProxyTarget');
const onChange = (object, onChange, options = {}) => {
const proxyTarget = Symbol('ProxyTarget');
let inApply = false;

@@ -65,3 +64,3 @@ let changed = false;

if (inApply && previous !== undefined && value !== undefined && property !== 'length') {
if (inApply && applyPrevious && previous !== undefined && value !== undefined && property !== 'length') {
let item = applyPrevious;

@@ -197,3 +196,3 @@

if (Array.isArray(thisArg)) {
if (Array.isArray(thisArg) || Object.prototype.toString.call(thisArg) === '[object Object]') {
applyPrevious = shallowClone(thisArg[proxyTarget]);

@@ -203,3 +202,4 @@ }

applyPath = pathCache.get(target);
applyPath = applyPath.slice(0, applyPath.lastIndexOf(PATH_SEPARATOR));
applyPath = applyPath.slice(0, Math.max(applyPath.lastIndexOf(PATH_SEPARATOR), 0));
const result = Reflect.apply(target, thisArg, argumentsList);

@@ -206,0 +206,0 @@

{
"name": "on-change",
"version": "1.4.0",
"version": "1.5.0",
"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