make-emitter

event emitter constructor factory

make-emitter

An event emitter constructor factory. Save ~3 lines of code with each use!

var EventEmitter = require('events').EventEmitter;
var util = require('util');
 
var CustomEmitter = function() {
  EventEmitter.call(this);
};
 
util.inherits(CustomEmitter, EventEmitter);
var emitter = require('make-emitter');
var CustomEmitter = emitter();

YOU JUST SAVED OVER 4 LINES OF CODE. incredible.

npm install make-emitter
npm test

MIT