Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
once: (name, options, handler) => {
const promise = new ZalgoPromise();
const listener = { name, options, handler, promise, once: true };
listeners.push(listener);
promise.cancel = () => {
listeners.splice(listeners.indexOf(listener), 1);
};
return promise;
},
send: () => {