From 028e1e6553d6fb2dbdddee2845d1d9f49722a4da Mon Sep 17 00:00:00 2001 From: Alexander Early Date: Sat, 22 Jun 2019 18:41:58 -0700 Subject: fix(docs): applyEach docs. Closes #1658 --- docs/v3/applyEach.js.html | 13 +++++++------ docs/v3/applyEachSeries.js.html | 6 +++--- docs/v3/docs.html | 27 ++++++++++++++------------- docs/v3/module-ControlFlow.html | 27 ++++++++++++++------------- 4 files changed, 38 insertions(+), 35 deletions(-) (limited to 'docs') diff --git a/docs/v3/applyEach.js.html b/docs/v3/applyEach.js.html index be2a3e5..15dbe22 100644 --- a/docs/v3/applyEach.js.html +++ b/docs/v3/applyEach.js.html @@ -98,13 +98,14 @@ import map from './map'; * function. * @param {Function} [callback] - the final argument should be the callback, * called when all functions have completed processing. - * @returns {Function} - If only the first argument, `fns`, is provided, it will - * return a function which lets you pass in the arguments as if it were a single - * function call. The signature is `(..args, callback)`. If invoked with any - * arguments, `callback` is required. + * @returns {AsyncFunction} - Returns a function that takes no args other than + * an optional callback, that is the result of applying the `args` to each + * of the functions. * @example * - * async.applyEach([enableSearch, updateSchema], 'bucket', (err, results) => { + * const appliedFn = async.applyEach([enableSearch, updateSchema], 'bucket') + * + * appliedFn((err, results) => { * // results[0] is the results for `enableSearch` * // results[1] is the results for `updateSchema` * }); @@ -112,7 +113,7 @@ import map from './map'; * // partial application example: * async.each( * buckets, - * async.applyEach([enableSearch, updateSchema]), + * async (bucket) => async.applyEach([enableSearch, updateSchema], bucket)(), * callback * ); */ diff --git a/docs/v3/applyEachSeries.js.html b/docs/v3/applyEachSeries.js.html index bb14107..d946090 100644 --- a/docs/v3/applyEachSeries.js.html +++ b/docs/v3/applyEachSeries.js.html @@ -93,9 +93,9 @@ import mapSeries from './mapSeries'; * function. * @param {Function} [callback] - the final argument should be the callback, * called when all functions have completed processing. - * @returns {Function} - If only the first argument is provided, it will return - * a function which lets you pass in the arguments as if it were a single - * function call. + * @returns {AsyncFunction} - A function, that when called, is the result of + * appling the `args` to the list of functions. It takes no args, other than + * a callback. */ export default applyEach(mapSeries); diff --git a/docs/v3/docs.html b/docs/v3/docs.html index 412eab3..8b11049 100644 --- a/docs/v3/docs.html +++ b/docs/v3/docs.html @@ -9243,7 +9243,7 @@ Invoked with (err, result).

-

(static) applyEach(fns, …argsopt, callbackopt) → {function}

+

(static) applyEach(fns, …argsopt, callbackopt) → {AsyncFunction}

@@ -9386,10 +9386,9 @@ called when all functions have completed processing.

@@ -9401,7 +9400,7 @@ arguments, callback is required.
-function +AsyncFunction
@@ -9412,7 +9411,9 @@ arguments, callback is required.
Example
-
async.applyEach([enableSearch, updateSchema], 'bucket', (err, results) => {
+    
const appliedFn = async.applyEach([enableSearch, updateSchema], 'bucket')
+
+appliedFn((err, results) => {
     // results[0] is the results for `enableSearch`
     // results[1] is the results for `updateSchema`
 });
@@ -9420,7 +9421,7 @@ arguments, callback is required.
 // partial application example:
 async.each(
     buckets,
-    async.applyEach([enableSearch, updateSchema]),
+    async (bucket) => async.applyEach([enableSearch, updateSchema], bucket)(),
     callback
 );
@@ -9485,7 +9486,7 @@ async.each( -

(static) applyEachSeries(fns, …argsopt, callbackopt) → {function}

+

(static) applyEachSeries(fns, …argsopt, callbackopt) → {AsyncFunction}

@@ -9622,9 +9623,9 @@ called when all functions have completed processing.

    -
  • If only the first argument is provided, it will return -a function which lets you pass in the arguments as if it were a single -function call.
  • +
  • A function, that when called, is the result of +appling the args to the list of functions. It takes no args, other than +a callback.
@@ -9636,7 +9637,7 @@ function call.
-function +AsyncFunction
diff --git a/docs/v3/module-ControlFlow.html b/docs/v3/module-ControlFlow.html index 7027346..ed1ff8e 100644 --- a/docs/v3/module-ControlFlow.html +++ b/docs/v3/module-ControlFlow.html @@ -188,7 +188,7 @@ -

(static) applyEach(fns, …argsopt, callbackopt) → {function}

+

(static) applyEach(fns, …argsopt, callbackopt) → {AsyncFunction}

@@ -331,10 +331,9 @@ called when all functions have completed processing.

    -
  • If only the first argument, fns, is provided, it will -return a function which lets you pass in the arguments as if it were a single -function call. The signature is (..args, callback). If invoked with any -arguments, callback is required.
  • +
  • Returns a function that takes no args other than +an optional callback, that is the result of applying the args to each +of the functions.
@@ -346,7 +345,7 @@ arguments, callback is required.
-function +AsyncFunction
@@ -357,7 +356,9 @@ arguments, callback is required.
Example
-
async.applyEach([enableSearch, updateSchema], 'bucket', (err, results) => {
+    
const appliedFn = async.applyEach([enableSearch, updateSchema], 'bucket')
+
+appliedFn((err, results) => {
     // results[0] is the results for `enableSearch`
     // results[1] is the results for `updateSchema`
 });
@@ -365,7 +366,7 @@ arguments, callback is required.
 // partial application example:
 async.each(
     buckets,
-    async.applyEach([enableSearch, updateSchema]),
+    async (bucket) => async.applyEach([enableSearch, updateSchema], bucket)(),
     callback
 );
@@ -430,7 +431,7 @@ async.each( -

(static) applyEachSeries(fns, …argsopt, callbackopt) → {function}

+

(static) applyEachSeries(fns, …argsopt, callbackopt) → {AsyncFunction}

@@ -567,9 +568,9 @@ called when all functions have completed processing.

    -
  • If only the first argument is provided, it will return -a function which lets you pass in the arguments as if it were a single -function call.
  • +
  • A function, that when called, is the result of +appling the args to the list of functions. It takes no args, other than +a callback.
@@ -581,7 +582,7 @@ function call.
-function +AsyncFunction
-- cgit v1.2.1