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

watch

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

watch - npm Package Compare versions

Comparing version 0.5.0 to 0.5.1

25

main.js

@@ -32,13 +32,22 @@ // Copyright 2010-2011 Mikeal Rogers

callback.pending -= 1;
files.forEach(function (f) {
files.forEach(function (f, index) {
f = path.join(dir, f);
callback.pending += 1;
fs.stat(f, function (err, stat) {
if (err) return callback(err)
var enoent = false;
if (err) {
if (err.code !== 'ENOENT') {
return callback(err);
} else {
enoent = true;
}
}
callback.pending -= 1;
if (options.ignoreDotFiles && path.basename(f)[0] === '.') return;
if (options.filter && options.filter(f)) return;
callback.files[f] = stat;
if (stat.isDirectory()) walk(f, options, callback);
if (callback.pending === 0) callback(null, callback.files);
if (!enoent) {
if (options.ignoreDotFiles && path.basename(f)[0] === '.') return;
if (options.filter && options.filter(f, stat)) return;
callback.files[f] = stat;
if (stat.isDirectory()) walk(f, options, callback);
if (callback.pending === 0) callback(null, callback.files);
}
})

@@ -85,3 +94,3 @@ })

fileWatcher(root);
for (i in files) {
for (var i in files) {
fileWatcher(i);

@@ -88,0 +97,0 @@ }

{ "name" : "watch"
, "description" : "Utilities for watching file trees."
, "tags" : ["util", "utility", "fs", "files"]
, "version" : "0.5.0"
, "version" : "0.5.1"
, "homepage": "https://github.com/mikeal/watch"

@@ -6,0 +6,0 @@ , "bugs":

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