2 ms·
Like many, I had written myself a similar utility some years ago because "I need several stuffs that don't depend on each other, so they could be downloaded or
by wildpeaks 13y ago
Like many, I had written myself a similar utility some years ago because "I need several stuffs that don't depend on each other, so they could be downloaded or calculated at the same time to get the end result faster" is a pattern that often comes up.
Nowadays I use "async.js" (https://github.com/caolan/async https://github.com/caolan/async): does the same, but with extra features.
It doesn't rely on jQuery unlike the snipplets of the article, so it's useful when you're aiming for vanilla or want to share code with Node.
It's far from the only library of this type, but I like it because it's reliable and has a good balance of simple yet tweakable for uncommon workflows.
- wildpeaks 13y agoI also like promises-style solutions, but in practice it felt like it needed more things modified to work with them than async when mixing with third-party libraries required by projects, but that's more a gut feeling than backed by hard numbers, so I'll reevaluate that assertion when the right project comes along.