5 ms·
Yeah, I assumed there had to be libraries to do this already, but didn't come across anything that did what I wanted. I'll check out async though, thanks for th
by defeated 16y ago
Yeah, I assumed there had to be libraries to do this already, but didn't come across anything that did what I wanted. I'll check out async though, thanks for the heads up.
- Detrus 16y agoThere are many many attempts at solving this problem, both libraries and preprocessors. None seem to satisfy a large audience, most people seem to deal with the callback nesting and hope to avoid cases where it gets super ugly. I have a lot bookmarked on github, these are mostly libraries. https://github.com/coolaj86/futures https://github.com/coolaj86/futures https://github.com/substack/node-seq https://github.com/substack/node-seq https://github.com/marcuswestin/fun https://github.com/marcuswestin/fun https://github.com/creationix/step https://github.com/creationix/step https://github.com/chriso/chain.js https://github.com/chriso/chain.js https://github.com/substack/node-chainsaw https://github.com/substack/node-chainsaw https://github.com/caolan/async https://github.com/caolan/async https://github.com/kriszyp/promised-io https://github.com/kriszyp/promised-io https://github.com/kriszyp/node-promise https://github.com/kriszyp/node-promise https://github.com/technoweenie/node-chain-gang https://github.com/technoweenie/node-chain-gang https://github.com/creationix/do https://github.com/creationix/do https://github.com/willconant/flow-js https://github.com/willconant/flow-js https://github.com/creationix/conductor https://github.com/creationix/conductor Some branches of CoffeeScript are also trying to ease the pain. Defer keyword didn't make it into CoffeeScript main. My impression is CoffeeScript makes callback hell less ugly anyway, so there is less need for adding a complex language feature that generates unreadable JavaScript.