iron-beam
iron-beam is a interchangeable replacement for events.EventEmitter
with wildcards, annotations and interception of event lifecycles.
Installation
npm install iron-beam
Usage
all the methods available from node.js events.EventEmitter
are documented here.
wildcard listeners
var ib = ; ib; ib;
annotations
var ib = ; ib; ib; // you can also get listeners by annotationvar ib = ; ib; ib; ib; // returns any annotated listener so both listeners will be returned // or an annotation can be used to query the listeners ib; // returns any annotated listener who's annotation matches the passed object so only the first listener will be returned // you can do the same without the event name ib; // returns both listeners // or ib; // returns only the first // listeners can be removed the same wayib; // both listeners will be removed // or ib; // the first listener will be removed
interception
var ib = ; ib; ib;ib;