overshadow-listeners
Add an event listener before existing listeners.
Why
Event listeners always fire in the order they are added, yet sometimes we have no control over this ordering and require certain listeners to definitely run before any others.
Example
var http = var Overshadow = var server = http server
detach/reattach
Alternatively, manually detach and reattach listeners:
var overshadow = overshadow // attach whatever listeners you needserver overshadow// remember to reattach old listeners
detach/reattach is chainable
We've included a simple .then(fn)
method you can call to make chainable the process of detaching, doing something then reattaching. .then(fn)
does nothing but execute the supplied function
// remember to reattach old listeners
Also See
Licence
MIT