mefirst

Attach an event listener to run first

npm install mefirst
8 downloads in the last week
63 downloads in the last month

node-mefirst

Attach an event listener to run first.

Usage

var EventEmitter = require('events').EventEmitter
  , emitter = new EventEmitter
  , mefirst = require('mefirst')

emitter.on('something', function() {
  console.log('i ran');
});

mefirst(emitter, 'something', function() {
  console.log('i ran first!');
});

emitter.emit('something');
i ran first!
i ran

License

MIT

npm loves you