From 028e1e6553d6fb2dbdddee2845d1d9f49722a4da Mon Sep 17 00:00:00 2001
From: Alexander Early
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.args
to each
+of the functions.callback
is required.
callback
is required.
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