@kotinash/better-events
v1.0.3
Published
A Node.JS eventing system with built-in `.cancel()` support
Readme
better-events
A Node.JS eventing system with built-in .cancel() support
Example usage
EventEmitter.on("hello", (event) => {
event.cancel()
})
EventEmitter.emit(
new Event(
"hello",
{
field1: true,
},
() => {
console.log("Hello, world!")
}
),
true
)