Weighted Emitter
This utility is a basic event emitter, and allows sorting the listener callbacks by weight.
Installation
$ npm install weighted-emitter
Usage
const WeightedEmitter = ;const emitter = ; emitter; emitter; emitter;
Listeners can also be removed;
emitter;// Or to remove all listeners of an event;emitter;
Testing
A mocha test suite has been provided and can be run by:
$ npm test