Attach an event listener to run first.
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
examples
test
.gitignore
Makefile
README.md
index.js
package.json

README.md

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