Browsing through http://microjs.com, I see lots of libraries labelled \"event emitters\". I like to think I know my way around the basics of the Javascript language pretty
Simple example in Node.js:
var EventEmitter = require('events').EventEmitter;
var concert = new EventEmitter;
var singer = 'Coldplay';
concert.on('start', function (singer) {
console.log(`OMG ${singer}!`);
});
concert.on('finish', function () {
console.log(`It was the best concert in my life...`);
});
concert.emit('start', singer);
concert.emit('finish');