2.0.1 • Published 8 years ago

nevent v2.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

nevent

Greenkeeper badge NPM version Build status License Code style

A tiny event emitter implementation.

Installation

$ npm install --save nevent

or:

$ yarn add nevent

In the browser use browserify or similar.

Usage

First create a new instance of the class.

const NEvent = require('nevent')

const event = new NEvent()

Register callbacks:

event.on('an event', val => {
  doSomethingWith(val)
})

event.on('another thing', val => {
  // etc...
})

...and emit events:

event.emit('an event', 42)

For simplicity, calling .on() for the same event name will replace the existing handler.

2.0.1

8 years ago

2.0.0

8 years ago

1.3.1

8 years ago

1.3.0

10 years ago

1.1.0

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago

0.2.0

10 years ago

0.1.1

11 years ago

0.0.5

11 years ago

0.0.4

11 years ago

0.0.3

11 years ago

0.0.2

11 years ago

0.0.1

11 years ago