We use on, add or subscribe methods to listen to an event and use off, remove or unsubscribe methods to remove our listener.
on
add
subscribe
off
remove
unsubscribe
Then we can use trigger, broadcast or propagate or emit or publish methods to propagate an event and call all subscribing callbacks.
trigger
broadcast
propagate
emit
publish
messagy was built for use in tiny to small sized projects and should be easy to replace with something more heavy-duty. different namings was used for the same methods so that you can use what ever that you are more familiar with/prefer/is more in sync with your future messaging library. A rule of thumb is that there are only three methods:
on("event name", callback)
add("event name", callback)
subscribe("event name", callback)
trigger("event name")
broadcast("event name")
propagate("event name")
emit("event name")
publish("event name")
off("event name", callback)
remove("event name", callback)
unsubscribe("event name", callback)