mafintosh/recursive-watch

Minimal recursive file watcher

JavaScript

83

12 commits

updated Oct 31, 2023

See the code

README

recursive-watch

Minimal recursive file watcher.

Uses the native recursive fs.watch option on macOS/Windows and basic recursive dir watching on Linux

npm install recursive-watch

Usage

var watch = require('recursive-watch')

watch('./a-file-or-directory', function (filename) {
  console.log('something changed with', filename)
})

API

var unwatch = watch(path, onchange)

Watch a directory or filename. Calls the onchange function if the path changed in anyway. Call the unwatch function to stop watching the path.

License

MIT

mafintosh/recursive-watch

Minimal recursive file watcher

JavaScript

83

12 commits

updated Oct 31, 2023

See the code

README

recursive-watch

Minimal recursive file watcher.

Uses the native recursive fs.watch option on macOS/Windows and basic recursive dir watching on Linux

npm install recursive-watch

Usage

var watch = require('recursive-watch')

watch('./a-file-or-directory', function (filename) {
  console.log('something changed with', filename)
})

API

var unwatch = watch(path, onchange)

Watch a directory or filename. Calls the onchange function if the path changed in anyway. Call the unwatch function to stop watching the path.

License

MIT

Project health

Overall

2.5/10

Maintained

0/10

Code review

3/10
OpenSSF Scorecard

Latest release

1.1.4 · Mar 28, 2018

Releases this year

0