summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Early <alexander.early@gmail.com>2019-06-22 18:30:20 -0700
committerAlexander Early <alexander.early@gmail.com>2019-06-22 18:30:28 -0700
commit3df919668ea082a827902839bbc2912e1db22046 (patch)
treefc5ae9faf5bed6460ca54ccddaa2122c3c99b886
parent8fce7e1a24b8328e34232d3b685df0b7c311c12a (diff)
downloadasync-3df919668ea082a827902839bbc2912e1db22046.tar.gz
fix(doc): until example. Closes #1664
-rw-r--r--docs/v3/docs.html6
-rw-r--r--docs/v3/module-ControlFlow.html6
-rw-r--r--docs/v3/until.js.html6
-rw-r--r--lib/until.js6
4 files changed, 12 insertions, 12 deletions
diff --git a/docs/v3/docs.html b/docs/v3/docs.html
index 38f3e02..412eab3 100644
--- a/docs/v3/docs.html
+++ b/docs/v3/docs.html
@@ -14657,14 +14657,14 @@ callback. Invoked with (err, [results]);</p></td>
<h5>Example</h5>
<pre class="prettyprint"><code>const results = []
-async.until(function iter(next) {
+async.until(function test(page, cb) {
+ cb(null, page.next == null)
+}, function iter(next) {
fetchPage(url, (err, body) =&gt; {
if (err) return next(err)
results = results.concat(body.objects)
next(err, body)
})
-}, function test(page, cb) {
- cb(null, page.next == null)
}, function done (err) {
// all pages have been fetched
})</code></pre>
diff --git a/docs/v3/module-ControlFlow.html b/docs/v3/module-ControlFlow.html
index a9f84c5..7027346 100644
--- a/docs/v3/module-ControlFlow.html
+++ b/docs/v3/module-ControlFlow.html
@@ -5602,14 +5602,14 @@ callback. Invoked with (err, [results]);</p></td>
<h5>Example</h5>
<pre class="prettyprint"><code>const results = []
-async.until(function iter(next) {
+async.until(function test(page, cb) {
+ cb(null, page.next == null)
+}, function iter(next) {
fetchPage(url, (err, body) =&gt; {
if (err) return next(err)
results = results.concat(body.objects)
next(err, body)
})
-}, function test(page, cb) {
- cb(null, page.next == null)
}, function done (err) {
// all pages have been fetched
})</code></pre>
diff --git a/docs/v3/until.js.html b/docs/v3/until.js.html
index 59ecaef..c352377 100644
--- a/docs/v3/until.js.html
+++ b/docs/v3/until.js.html
@@ -103,14 +103,14 @@ import wrapAsync from &apos;./internal/wrapAsync&apos;;
*
* @example
* const results = []
- * async.until(function iter(next) {
+ * async.until(function test(page, cb) {
+ * cb(null, page.next == null)
+ * }, function iter(next) {
* fetchPage(url, (err, body) =&gt; {
* if (err) return next(err)
* results = results.concat(body.objects)
* next(err, body)
* })
- * }, function test(page, cb) {
- * cb(null, page.next == null)
* }, function done (err) {
* // all pages have been fetched
* })
diff --git a/lib/until.js b/lib/until.js
index 0c407a3..4f71ce9 100644
--- a/lib/until.js
+++ b/lib/until.js
@@ -26,14 +26,14 @@ import wrapAsync from './internal/wrapAsync';
*
* @example
* const results = []
- * async.until(function iter(next) {
+ * async.until(function test(page, cb) {
+ * cb(null, page.next == null)
+ * }, function iter(next) {
* fetchPage(url, (err, body) => {
* if (err) return next(err)
* results = results.concat(body.objects)
* next(err, body)
* })
- * }, function test(page, cb) {
- * cb(null, page.next == null)
* }, function done (err) {
* // all pages have been fetched
* })