Socket
Socket
Sign inDemoInstall

metawatch

Package Overview
Dependencies
0
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    metawatch

Deep nested directories watch for node.js


Version published
Maintainers
1
Install size
6.92 kB
Created

Changelog

Source

[1.2.1][] - 2023-12-11

  • Update dependencies and package maintenance

Readme

Source

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.

Keywords

FAQs

Last updated on 11 Dec 2023

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc