keep your pants on, async requests
slow is smooth, smooth is fast.
npm install slow
slow=require'slow';slowwalk 1234 random_wait console.log;//results, in ordersetTimeoutcallbcki Mathrandom*4000;
so you don't immediately do everything at once.
###like some fool.
you can be safe with memory and respect external services. #the methods are:
##rate-limited explicitly set a pace, but respect a maximum current request rate (defaults to 10)
(it begins at this pace, but slows it down if callbacks begin to build-up)
##count-limited do only a few things at a time. (only go as fast as your callback does)
##the options are:
debug: true //understand when the requests are being firedverbose: true //include the input in the resultsconsole.logrlength //watch the results coming in in real-timemax: 10 //the most number of concurrent requests you're comfortable making
but you can just ignore those tho
##in the f-ing Browzers!1 (2.8k)
##what about my craziness.. if you're in a situation that needs fancy paramaters, wrap them up like this:
slowsteady 1234 whatev console.log;my_crazinessparam1 param2 then_finally a callback //works fine
or if your function returns [errror, result] (i hate that)
slowsteady 1234 whatev console.log;my_crazinessicallbackresult||err;//la de da;)