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

metawatch

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

metawatch - npm Package Compare versions

Comparing version 1.0.8 to 1.1.0

10

metawatch.js

@@ -13,4 +13,3 @@ 'use strict';

this.watchers = new Map();
const { timeout } = options;
this.timeout = typeof timeout === 'number' ? timeout : WATCH_TIMEOUT;
this.timeout = options.timeout || WATCH_TIMEOUT;
this.timer = null;

@@ -32,6 +31,9 @@ this.queue = new Map();

this.timer = null;
for (const [filePath, event] of this.queue) {
const queue = [...this.queue.entries()];
this.queue.clear();
this.emit('before', queue);
for (const [filePath, event] of queue) {
this.emit(event, filePath);
}
this.queue.clear();
this.emit('after', queue);
}

@@ -38,0 +40,0 @@

4

package.json
{
"name": "metawatch",
"version": "1.0.8",
"version": "1.1.0",
"author": "Timur Shemsedinov <timur.shemsedinov@gmail.com>",

@@ -41,3 +41,3 @@ "description": "Deep nested directories watch for node.js",

"devDependencies": {
"@types/node": "^18.11.9",
"@types/node": "^20.2.5",
"eslint": "^8.27.0",

@@ -44,0 +44,0 @@ "eslint-config-metarhia": "^8.1.0",

@@ -30,2 +30,10 @@ # Deep nested directories watch for node.js

});
watcher.on('before', (changes) => {
console.log({ changes });
});
watcher.on('after', (changes) => {
console.log({ changes });
});
```

@@ -32,0 +40,0 @@

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