diff options
-rw-r--r-- | lib/applyEach.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/applyEach.js b/lib/applyEach.js index 93d8af3..9228d44 100644 --- a/lib/applyEach.js +++ b/lib/applyEach.js @@ -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 @@ -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( |