summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorAlexander Early <alexander.early@gmail.com>2019-06-22 18:41:58 -0700
committerAlexander Early <alexander.early@gmail.com>2019-06-22 18:41:58 -0700
commit028e1e6553d6fb2dbdddee2845d1d9f49722a4da (patch)
treeb0796bc63605b925af0783541f770928de466b8f /docs
parent3df919668ea082a827902839bbc2912e1db22046 (diff)
downloadasync-028e1e6553d6fb2dbdddee2845d1d9f49722a4da.tar.gz
fix(docs): applyEach docs. Closes #1658
Diffstat (limited to 'docs')
-rw-r--r--docs/v3/applyEach.js.html13
-rw-r--r--docs/v3/applyEachSeries.js.html6
-rw-r--r--docs/v3/docs.html27
-rw-r--r--docs/v3/module-ControlFlow.html27
4 files changed, 38 insertions, 35 deletions
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 &apos;./map&apos;;
* 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], &apos;bucket&apos;, (err, results) =&gt; {
+ * const appliedFn = async.applyEach([enableSearch, updateSchema], &apos;bucket&apos;)
+ *
+ * appliedFn((err, results) =&gt; {
* // results[0] is the results for `enableSearch`
* // results[1] is the results for `updateSchema`
* });
@@ -112,7 +113,7 @@ import map from &apos;./map&apos;;
* // partial application example:
* async.each(
* buckets,
- * async.applyEach([enableSearch, updateSchema]),
+ * async (bucket) =&gt; 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 &apos;./mapSeries&apos;;
* 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);
</code></pre>
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).</p></td>
- <h4 class="name" id="applyEach"><span class="type-signature">(static) </span>applyEach<span class="signature">(fns, &#x2026;args<span class="signature-attributes">opt</span>, callback<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &#x2192; {function}</span></h4>
+ <h4 class="name" id="applyEach"><span class="type-signature">(static) </span>applyEach<span class="signature">(fns, &#x2026;args<span class="signature-attributes">opt</span>, callback<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &#x2192; {<a href="global.html">AsyncFunction</a>}</span></h4>
@@ -9386,10 +9386,9 @@ called when all functions have completed processing.</p></td>
<div class="param-desc">
<ul>
-<li>If only the first argument, <code>fns</code>, 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 <code>(..args, callback)</code>. If invoked with any
-arguments, <code>callback</code> is required.</li>
+<li>Returns a function that takes no args other than
+an optional callback, that is the result of applying the <code>args</code> to each
+of the functions.</li>
</ul>
</div>
@@ -9401,7 +9400,7 @@ arguments, <code>callback</code> is required.</li>
</dt>
<dd>
-<span class="param-type">function</span>
+<span class="param-type"><a href="global.html">AsyncFunction</a></span>
</dd>
@@ -9412,7 +9411,9 @@ arguments, <code>callback</code> is required.</li>
<h5>Example</h5>
- <pre class="prettyprint"><code>async.applyEach([enableSearch, updateSchema], &apos;bucket&apos;, (err, results) =&gt; {
+ <pre class="prettyprint"><code>const appliedFn = async.applyEach([enableSearch, updateSchema], &apos;bucket&apos;)
+
+appliedFn((err, results) =&gt; {
// results[0] is the results for `enableSearch`
// results[1] is the results for `updateSchema`
});
@@ -9420,7 +9421,7 @@ arguments, <code>callback</code> is required.</li>
// partial application example:
async.each(
buckets,
- async.applyEach([enableSearch, updateSchema]),
+ async (bucket) =&gt; async.applyEach([enableSearch, updateSchema], bucket)(),
callback
);</code></pre>
@@ -9485,7 +9486,7 @@ async.each(
- <h4 class="name" id="applyEachSeries"><span class="type-signature">(static) </span>applyEachSeries<span class="signature">(fns, &#x2026;args<span class="signature-attributes">opt</span>, callback<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &#x2192; {function}</span></h4>
+ <h4 class="name" id="applyEachSeries"><span class="type-signature">(static) </span>applyEachSeries<span class="signature">(fns, &#x2026;args<span class="signature-attributes">opt</span>, callback<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &#x2192; {<a href="global.html">AsyncFunction</a>}</span></h4>
@@ -9622,9 +9623,9 @@ called when all functions have completed processing.</p></td>
<div class="param-desc">
<ul>
-<li>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.</li>
+<li>A function, that when called, is the result of
+appling the <code>args</code> to the list of functions. It takes no args, other than
+a callback.</li>
</ul>
</div>
@@ -9636,7 +9637,7 @@ function call.</li>
</dt>
<dd>
-<span class="param-type">function</span>
+<span class="param-type"><a href="global.html">AsyncFunction</a></span>
</dd>
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 @@
- <h4 class="name" id="applyEach"><span class="type-signature">(static) </span>applyEach<span class="signature">(fns, &#x2026;args<span class="signature-attributes">opt</span>, callback<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &#x2192; {function}</span></h4>
+ <h4 class="name" id="applyEach"><span class="type-signature">(static) </span>applyEach<span class="signature">(fns, &#x2026;args<span class="signature-attributes">opt</span>, callback<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &#x2192; {<a href="global.html">AsyncFunction</a>}</span></h4>
@@ -331,10 +331,9 @@ called when all functions have completed processing.</p></td>
<div class="param-desc">
<ul>
-<li>If only the first argument, <code>fns</code>, 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 <code>(..args, callback)</code>. If invoked with any
-arguments, <code>callback</code> is required.</li>
+<li>Returns a function that takes no args other than
+an optional callback, that is the result of applying the <code>args</code> to each
+of the functions.</li>
</ul>
</div>
@@ -346,7 +345,7 @@ arguments, <code>callback</code> is required.</li>
</dt>
<dd>
-<span class="param-type">function</span>
+<span class="param-type"><a href="global.html">AsyncFunction</a></span>
</dd>
@@ -357,7 +356,9 @@ arguments, <code>callback</code> is required.</li>
<h5>Example</h5>
- <pre class="prettyprint"><code>async.applyEach([enableSearch, updateSchema], &apos;bucket&apos;, (err, results) =&gt; {
+ <pre class="prettyprint"><code>const appliedFn = async.applyEach([enableSearch, updateSchema], &apos;bucket&apos;)
+
+appliedFn((err, results) =&gt; {
// results[0] is the results for `enableSearch`
// results[1] is the results for `updateSchema`
});
@@ -365,7 +366,7 @@ arguments, <code>callback</code> is required.</li>
// partial application example:
async.each(
buckets,
- async.applyEach([enableSearch, updateSchema]),
+ async (bucket) =&gt; async.applyEach([enableSearch, updateSchema], bucket)(),
callback
);</code></pre>
@@ -430,7 +431,7 @@ async.each(
- <h4 class="name" id="applyEachSeries"><span class="type-signature">(static) </span>applyEachSeries<span class="signature">(fns, &#x2026;args<span class="signature-attributes">opt</span>, callback<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &#x2192; {function}</span></h4>
+ <h4 class="name" id="applyEachSeries"><span class="type-signature">(static) </span>applyEachSeries<span class="signature">(fns, &#x2026;args<span class="signature-attributes">opt</span>, callback<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &#x2192; {<a href="global.html">AsyncFunction</a>}</span></h4>
@@ -567,9 +568,9 @@ called when all functions have completed processing.</p></td>
<div class="param-desc">
<ul>
-<li>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.</li>
+<li>A function, that when called, is the result of
+appling the <code>args</code> to the list of functions. It takes no args, other than
+a callback.</li>
</ul>
</div>
@@ -581,7 +582,7 @@ function call.</li>
</dt>
<dd>
-<span class="param-type">function</span>
+<span class="param-type"><a href="global.html">AsyncFunction</a></span>
</dd>