Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Simple file/directory watcher. (Node.js)
It's quite simple to create a wtchr for a directory.
wtchr(path, [options]);
true
500
/(\/\.DS_Store$)/
var watch = wtchr('/my/watch/base/directory');
Wtchr provides simple event bindings. The event API is quite similar to jQuery events, so most of JS developers are familiar with it.
bind an event
.on(type, [selector], handler(path, curr lstat, prev lstat))
unbind an event
.off(type, [selector], [handler(path, curr lstat, prev lstat)])
create
/ change
/ delete
var watch = wtchr('/my/watch/base/directory')
watch.on("create", "*.js", function (path, curr, prev) {
console.log("New file: " + path);
});
watch.off("create");
Chaining:
wtchr('/my/watch/base/directory')
.on("create", "*.js", function (path, curr, prev) {
console.log("New file: " + path);
})
.on("change", "*.js", function (path, curr, prev) {
console.log("File changed: " + path);
})
.on("delete", "*.js", function (path, curr, prev) {
console.log("File deleted: " + path);
})
.off("create")
.off("delete");
Simply destroy the wtchr object with the destroy method.
.destroy()
var watch = wtchr('/my/watch/base/directory')
watch.destroy();
FAQs
Simple file/directory watcher.
The npm package wtchr receives a total of 290 weekly downloads. As such, wtchr popularity was classified as not popular.
We found that wtchr 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.