event-kitten

An event emitter inspired by event-kit, written in JavaScript

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
event-kitten
511.1.07 years ago8 years agoMinified + gzip package size for event-kitten in KB

Readme

Event Kitten

js-standard-style
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()