Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function subscribe(handler) {
const watcher = fsevents(TRANSPORT_FILE);
watcher.on('change', (path, info) => {
readFile(path, "utf-8", (err, data) => {
handler(data);
});
});
watcher.start()
}