2.0.1 • Published 7 years ago

nevent v2.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
7 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

7 years ago

2.0.0

7 years ago

1.3.1

7 years ago

1.3.0

8 years ago

1.1.0

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago

0.2.0

9 years ago

0.1.1

9 years ago

0.0.5

9 years ago

0.0.4

9 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago