Skip to content

Commit

Permalink
clarify applyEach docs. Closes #1501
Browse files Browse the repository at this point in the history
  • Loading branch information
aearly committed Jul 9, 2018
1 parent 3250bb9 commit d1374d0
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/applyEach.js
Expand Up @@ -6,7 +6,9 @@ import map from './map';
* `callback` after all functions have completed. If you only provide the first
* argument, `fns`, then it will return a function which lets you pass in the
* arguments as if it were a single function call. If more arguments are
* provided, `callback` is required while `args` is still optional.
* provided, `callback` is required while `args` is still optional. The results
* for each of the applied async functions are passed to the final callback
* as an array.
*
* @name applyEach
* @static
Expand All @@ -25,7 +27,10 @@ import map from './map';
* arguments, `callback` is required.
* @example
*
* async.applyEach([enableSearch, updateSchema], 'bucket', callback);
* async.applyEach([enableSearch, updateSchema], 'bucket', (err, results) => {
* // results[0] is the results for `enableSearch`
* // results[1] is the results for `updateSchema`
* });
*
* // partial application example:
* async.each(
Expand Down

0 comments on commit d1374d0

Please sign in to comment.