1.0.9 • Published 7 years ago

nodejs-events v1.0.9

Weekly downloads
3
License
ISC
Repository
github
Last release
7 years ago

nodejs-events

node-js events is a little package to easily make events in node.js

API

Events.on(events, callback)

Listen to an event:

Events.on("some-event", (e) => {
	console.log(e) // <- ["Node-js events are so easy!"]
})

You can listen to as much events as you want:

Events.on("some-event some-other-event", (e) => {
	console.log(e) // <- ["Node-js events", "are so easy!"]
})

Events.emit(events, args)

Emit an event:

Events.emit("some-event", "Node-js events are so easy!")

You can emit as much events as you want:

Events.emit("some-event some-other-event", "Node-js events", "are so easy!")

Events.off(events)

Stop listening to an event:

Events.off("some-event")

You can stop listening to as much events as you want:

Events.off("some-event some-other-event")
1.0.9

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago