hij1nx/EventEmitter2 — pull request #103 by lordvlad (2013-11-02 15:38:05+00:00)
Title: sort events by a counter before firing them. adresses issue #94

A simple counter is added to the EventEmitter object, wich will be raised with each addition of a listener. The current count will be attached to the attached event handling function. Before firing an array of callback functions, the array is sorted by the value of the counter, thus ensuring that the callback functions are fired in the same order they were attached, whether they contain wildcards or not. not sure how the sort impacts performance though, I've never had the chance to look into testing.