Re:Pseudosynchronous JavaScript
by madeofpalk on Thursday June 25, 2015 @08:41AM
(#9777417)
It appears you've changed the API though? Just chain the promises instead of nesting them https://gist.github.com/joshhunt/e3761594d10bb7025bcb
[ Parent
| on HN ]
Chaining them is also perfectly viable (still one nesting level), as long as you're not dipicting a non-existing problem ("callback hell") it's all good. I used .call since OP used Q promises in the article - this works about as well with other libraries.
Re:Pseudosynchronous JavaScript
by frank-weindel on Thursday June 25, 2015 @10:59AM
(#9778342)
That's how I'd do it.