Defer function execution until all its arguments are ready
Control flow utility that runs a callback after all the dependencies are (asynchronously) met. Useful when a function depends on some resources that are obtained asynchronously and independently.
var done = gatherconsole.loga + b;;asyncasyncdone'foo' undefined;;;asyncdoneundefined 'bar';;// Prints "foobar".
Returns a function that can feed results to
Pass arguments as they become ready, interleaving with
undefined for not-yet-resolved ones. The order and total count matter.
Once all the arguments are supplied,
done is finally called.
npm install gather