
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
watchwithproxy
Advanced tools
This small library, written in Typescript, uses the Proxy object from ecma6 to monitor objects for changes. It then signals a function with the details of the change.
The class itself is fairly simple. It's similar to Watch.js, but written in Typescript, uses Proxies, and doesn't rely on timers to get the addition of new properties. This class is much lighter than Watch.js.
import * as WatchWithProxy from '../src/';
let options = new WatchWithProxy.WatchOptions();
options.levels = 1;
function listener(sender:any, property: string, oldval:any, newval:any) {
console.log("Updated callback! sender: ", sender.toString(), "property:", property, "old:", oldval, "new:", newval);
}
let watchedTest3 = WatchWithProxy.Watcher.Watch(test3, options, listener);
After that, all changes to the object watchedtest3 are going to be signaled in the listener function. This module supports arrays and their methods too.
So you can track push, pop, shift, etc...
I may have missed some methods that modify properties. Feel free to add them and send a pull request my way.
The test/index.ts shows a sample showing the various ways to use it.
FAQs
Watch for changes in an object with a proxy
We found that watchwithproxy demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.