summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Early <alexander.early@gmail.com>2018-07-08 17:05:48 -0700
committerAlexander Early <alexander.early@gmail.com>2018-07-08 17:05:48 -0700
commitd1374d0155867f76578748595eddf84b6a9f007d (patch)
treebaa110be196df9a9b17102ab363ecf0afa284261
parent3250bb95b6fb7d78707ddd784ca8dc15a420c313 (diff)
downloadasync-d1374d0155867f76578748595eddf84b6a9f007d.tar.gz
clarify applyEach docs. Closes #1501
-rw-r--r--lib/applyEach.js9
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(