callback-collector
When I was first getting acquainted with node.js, I was experimenting with different
ideas for handling async callbacks. This is one of the ideas I had where you wrap each
of your callbacks in a call to callback-collector
. callback-collector
intercepts each
callback and counts the number of still pending callbacks.
Ultimately it is not what I settled on for general use; I do not recall exactly why. But, here it is for good measure anyway.
install
npm install callback-collector
example
var request = ;var cbc = ; var c = ; ; ;
output:
2. https request is finished1. setTimeout is done0. all callbacks have been called
license
MIT