emissary

Node mixins for subscribing to and emitting events

View the Project on GitHub atom/emissary

Emissary – Mixins for Events Build Status

Achtung! The Subscriber mixin requires ES6 Harmony WeakMaps. To enable them, run your program with the node --harmony_collections flag. If you're using it in a node framework such as jasmine, run its script with the flag enabled as follows: node --harmony-collections .bin/jasmine-node specs.

Emitter

Emitter is backward-compatible with Node's event emitter, but offers more functionality. You can construct standalone Emitter instances or use it as a mixin.

Subscriber

Subscriber works in partnership with an emitter or any object supporting subscription cancellation with .off. This includes standard Node event emitters and jQuery objects.