yaw
v1.0.1
Published
(Y)et(A)nother(W)atch utility.
Downloads
9
Readme
(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
});