@kotinash/better-events

1.0.3 • Public • Published

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
)

Readme

Keywords

none

Package Sidebar

Install

npm i @kotinash/better-events

Weekly Downloads

1

Version

1.0.3

License

none

Unpacked Size

3.27 kB

Total Files

5

Last publish

Collaborators

  • kotinash