Skip to content

Commit

Permalink
fix(doc): until example. Closes #1664
Browse files Browse the repository at this point in the history
  • Loading branch information
aearly committed Jun 23, 2019
1 parent 8fce7e1 commit 3df9196
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions docs/v3/docs.html
Expand Up @@ -14657,14 +14657,14 @@ <h5>Returns:</h5>
<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>
Expand Down
6 changes: 3 additions & 3 deletions docs/v3/module-ControlFlow.html
Expand Up @@ -5602,14 +5602,14 @@ <h5>Returns:</h5>
<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>
Expand Down
6 changes: 3 additions & 3 deletions docs/v3/until.js.html
Expand Up @@ -103,14 +103,14 @@ <h1 class="page-title">until.js</h1>
*
* @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
* })
Expand Down
6 changes: 3 additions & 3 deletions lib/until.js
Expand Up @@ -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
* })
Expand Down

0 comments on commit 3df9196

Please sign in to comment.