@anzerr/fs.watcher

event based directory watcher

Usage no npm install needed!

<script type="module">
  import anzerrFsWatcher from 'https://cdn.skypack.dev/@anzerr/fs.watcher';
</script>

README

Intro

GitHub Actions status | linter GitHub Actions status | publish GitHub Actions status | test

Watch a directory and emit when a change/add/remove has happened to a file or folder.

Install

npm install --save git+https://github.com/anzerr/fs.watcher.git
npm install --save @anzerr/fs.watcher

Example

const Watcher = require('fs.watcher');

let watch = new Watcher(process.cwd()).on('change', (r) => {
    console.log('change', r);
});