events-light

1.0.5 • Public • Published

events-light

This is a lighter and small version of the builtin Node.js events with some removals, but no additional features. This module was designed to be a trimmed down polyfill for the events module in the browser, but it can also be used on the server.

Install

npm install events-light --save

Usage

var EventEmitter = require('events-light');
 
var myEventEmitter = new EventEmitter();
 
myEventEmitter.on('hello', function(name) {
    console.log('Hello ' + name);
});
 
myEventEmitter.emit('hello', 'World');

Difference from the Node.js events module

License

MIT

Dependents (5)

Package Sidebar

Install

npm i events-light

Weekly Downloads

4,230

Version

1.0.5

License

MIT

Last publish

Collaborators

  • austinkelleher
  • dylanpiercey
  • mlrawlings
  • pnidem