node package manager

Introducing npm Enterprise add-ons. Integrate third-party dev tools into npm…


Same as node Events with support for handler context


This is a "fork" of node's Events module with support for specifying a context for the handler

Everything is the same as Events except:

If the context is not specified, this (the emitter) will be used as the context.

var Emitter = require('emitter-context')
  , x = new Emitter()
var context = { foo: 'bar' };
x.on('baz', function () {
}, context);
// true - There are listeners for `baz` 
// 'bar'