3 ms·
Nowadays whenever I see a callback waterfall forming, my first thought is https://npmjs.org/package/node-async https://npmjs.org/package/node-async.
by kennu 14y ago
Nowadays whenever I see a callback waterfall forming, my first thought is https://npmjs.org/package/node-async https://npmjs.org/package/node-async.
- dmix 14y agoYep there's plenty of solutions to callback hell. My particular favourite is the Lamina library in clojure which takes the event-driven approach https://github.com/ztellman/lamina/wiki/Introduction https://github.com/ztellman/lamina/wiki/Introduction
- wfunction 14y agoYou should take a look at C#'s 'async' and 'await' keywords, which keep code asynchronous code looking sequential: http://msdn.microsoft.com/en-us/library/vstudio/hh156513.aspx http://msdn.microsoft.com/en-us/library/vstudio/hh156513.asp...
- catshirt 14y agoOP is in a pretty unique form of callback hell. a list, a function, and a for loop would suffice.