0.0.3 • Published 10 years ago
es2015-event-emitter v0.0.3
Tiny, ES2015 EventEmitter Class
Installation: npm install es2015-event-emitter
Usage:
let EventEmitter = require('es2015-event-emitter');
class MyClass extends EventEmitter {}
let mc = new MyClass();
mc.listenTo(someObj, 'change', () => {});
someObj.trigger('change');
Run tests:
npm test
Notes:
This currently only works with the --harmony
flag passed to Node.
A build step will be added shortly to make it work in ES5 environments,
even though they already have plenty of EventEmitter implementations.