eventemitter-light

Tiny event emitter

eventemitter-light

Tiny event emitter for node and the browser

var EventEmitter = require("eventemitter-light");
 
var ee = Object.create(EventEmitter).constructor();
 
ee.on('foo.namespaces', logFoo);
ee.emit('*.namespaces');
 
function logFoo() {
    console.log('foo');
}

EventEmitter2 is 2kb. That's far too much. EE-light is a sensible 400bytes.

It's like EventEmitter build into node.

npm install eventemitter-light

make test

  • Raynos