yaw

1.0.1 • Public • Published

NPM Version Build Status

(Y)et (A)nother (W)atch utility. This time event based.

Installation

npm install yaw

Usage

const watcherFactory = require('yaw');
const watcher = watcherFactory();
 
watcher.watch('some/file/or/directory')
  .on('error', (err) => {
    // Handle error
  })
  .on('create', (filepath, stats) => {
    // Handle new file or directory
  })
  .on('change', (filepath, stats) => {
    // Handle update to file
  })
  .on('delete', (filepath) => {
    // Handle removal of file or directory
  });

Readme

Keywords

Package Sidebar

Install

npm i yaw

Weekly Downloads

3

Version

1.0.1

License

MIT

Last publish

Collaborators

  • popeindustries