yuanchuan / node-watch

A wrapper and enhancements for fs.watch
https://npm.im/node-watch
MIT License
339 stars 44 forks source link

Only pass skip on initial recurse #117

Closed wmertens closed 2 years ago

wmertens commented 2 years ago

Since skip is truthy, it's a nice way to check if the ignore-check is being run to verify directories or if it's based on a change event.

That way, the initial lookup can perform more expensive checks.

So I propose that skip is only passed when doing the initial recursive lookup, and for other calls, false is passed.