Because events are scoped to the emitting object...except when they are not (for instance, on remote events coming through a remote stream, it's useful to have them name-spaced).
With this you can create a box on top of an event emitter (call it rooms or channels if you will) and emit scoped to that box name.
You can have multiple nested boxes.
A box supports the event emitter API plus wildcard events(opt-in).
$ npm install boxed-emitter
var boxedEmitter = ;
var emitter = ;
var EE = EventEmitter;var ee = ;var emitter = ;
and give it a name:
var box = emitter;
// the following emits box-name::eventbox;// which you can listen tobox;
var emitter = ;var bigBox = emitter;var smallBox = bigBox;bigBox;smallBox;
// first you have to enable wildcards for this:box;box;box;
And, as a regular event emitter: