event-kitten
v1.1.0
Published
An event emitter inspired by event-kit, written in JavaScript
Downloads
636
Readme
Event Kitten
An event emitter inspired by event-kit, written in JavaScript. Meow.
Motivation
event-kit is pretty awesome however it is written in coffeescript :disappointed: and uses Grim which is a >1MB dependency!
API
var createEmitter = require('event-kitten')
var emitter = createEmitter()
var sub = emitter.on('foo', function () {
console.log('bar')
})
// logs 'bar'
emitter.emit('foo')
// remove the observer
sub.dispose()