An open API service indexing awesome lists of open source software.

https://github.com/qubitproducts/event-kitten

An event emitter inspired by event-kit, written in JavaScript
https://github.com/qubitproducts/event-kitten

ceh implement

Last synced: 10 months ago
JSON representation

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

Awesome Lists containing this project

README

          

Event Kitten
------------

[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)

An event emitter inspired by [event-kit](https://github.com/atom/event-kit), written in JavaScript. Meow.

### Motivation

[event-kit](https://github.com/atom/event-kit) is pretty awesome however it is written in coffeescript :disappointed: and uses [Grim](https://github.com/atom/grim) which is a >1MB dependency!

### API

```javascript
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()
```