
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
simple-watcher
Advanced tools
A simple recursive directory watcher.
I know there's plenty of them out there, but most don't seem to care about the recursive
option of Node's fs.watch()
, which significantly improves performance on the supported platforms, especially for large directories.
Features:
recursive
options on OS X and Windows; uses a fallback for other platforms.ReadDirectoryChangesW
double reporting.const watch = require('simple-watcher')
/**
* Recursively watches for directory changes.
* @param {string} workingDir - Directory to watch.
* @param {function} callback - Triggered on change.
* @param {number} tolerance - Interval in which multiple changes to the same file
* on Windows will be treated as one; default is 200ms.
*/
watch('/path/to/directory', (filePath) => {
console.log(`Changed: ${filePath}`)
})
FAQs
"A simple file s watcher."
The npm package simple-watcher receives a total of 50,606 weekly downloads. As such, simple-watcher popularity was classified as popular.
We found that simple-watcher 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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.