1.2.1 • Published 5 months ago

metawatch v1.2.1

Weekly downloads
3
License
MIT
Repository
github
Last release
5 months ago

Deep nested directories watch for node.js

ci status snyk npm version npm downloads/month npm downloads license

  • Watch directories recursive
  • Rebuild recursive when new directories found or old directories remove
  • Deduplicate events with debounce

Usage

const metawatch = require('metawatch');

const watcher = new metawatch.DirectoryWatcher({ timeout: 200 });
watcher.watch('/home/marcus/Downloads');
watcher.watch('/home/marcus/Documents');

watcher.on('change', (fileName) => {
  console.log({ changed: fileName });
});

watcher.on('delete', (fileName) => {
  console.log({ deleted: fileName });
});

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

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

Contributors

License & Contributors

Copyright (c) 2020-2023 Metarhia contributors. Metawatch is MIT licensed. Metawatch is a part of Metarhia technology stack.

1.2.1

5 months ago

1.2.0

7 months ago

1.1.1

11 months ago

1.1.0

11 months ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

0.0.0

4 years ago