How to use fsevents - 1 common examples

To help you get started, we’ve selected a few fsevents examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github dkordik / dash-listener / lib / music-player-pauser / fs-pubsub.js View on Github external
export function subscribe(handler) {
	const watcher = fsevents(TRANSPORT_FILE);

	watcher.on('change', (path, info) => {
		readFile(path, "utf-8", (err, data) => {
			handler(data);
		});
	});

	watcher.start() 
}

fsevents

Native Access to MacOS FSEvents

MIT
Latest version published 8 months ago

Package Health Score

77 / 100
Full package analysis

Popular fsevents functions