Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

eventemitter-light Build Status

Tiny event emitter for node and the browser

Status: Beta

Example

var EventEmitter = require("eventemitter-light");

var ee = Object.create(EventEmitter).constructor();

ee.on('foo.namespaces', logFoo);
ee.emit('foo.namespaces');

function logFoo() {
	console.log('foo');
}

Motivation

EventEmitter2 is 2kb. That's far too much. EE-light is a sensible 250bytes

Documentation

It's like EventEmitter build into node.

ee.on("foo", works)

ee.emit('foo');
// works

function works() { console.log('works'); }

Supported methods

  • on
  • emit
  • removeListener
  • once

Installation

npm install eventemitter-light

Test

make test

Contributors

  • Raynos

MIT Licenced

About

It's a light event emitter

Resources

Stars

10 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages