@bleed-believer/entropy-watch
v0.0.0
Published
Minimal, multiplatform and deterministic file watcher
Downloads
9
Maintainers
Readme
@bleed-believer/entropy-watch
Installation
npm i --save @bleed-believer/entropy-watchExample
import { EntropyWatch } from '@bleed-believer/entropy-watch';
const watch = new EntropyWatch('./**/*.{ts,js}');
watch.on('created', paths => console.log('created:', paths));
watch.on('updated', paths => console.log('updated:', paths));
watch.on('deleted', paths => console.log('deleted:', paths));
process.once('SIGINT', () => {
watch.stop();
});
await watch.start();Options
exclude
string[]: Glob patterns to exclude form the search (available from Node v23 and up).interval
number: Polling rate in milliseconds, if not defined, the library uses50ms.hashlength
string: The hashing algorithm,sha512as default. See here for details.hashAlgorithm
number: The hash length (forshake256algorithm).
