Skip to content

Comment on 21 Nested Callbacks

Comments

Nowadays whenever I see a callback waterfall forming, my first thought is https://npmjs.org/package/node-async.

Yep 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

You 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.asp...

OP is in a pretty unique form of callback hell. a list, a function, and a for loop would suffice.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.