diff --git a/docs/v3/docs.html b/docs/v3/docs.html index 38f3e0200..412eab337 100644 --- a/docs/v3/docs.html +++ b/docs/v3/docs.html @@ -14657,14 +14657,14 @@
Returns:
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
 })
diff --git a/docs/v3/module-ControlFlow.html b/docs/v3/module-ControlFlow.html index a9f84c5ce..70273464f 100644 --- a/docs/v3/module-ControlFlow.html +++ b/docs/v3/module-ControlFlow.html @@ -5602,14 +5602,14 @@
Returns:
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
 })
diff --git a/docs/v3/until.js.html b/docs/v3/until.js.html index 59ecaef5f..c352377d7 100644 --- a/docs/v3/until.js.html +++ b/docs/v3/until.js.html @@ -103,14 +103,14 @@

until.js

* * @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 * }) diff --git a/lib/until.js b/lib/until.js index 0c407a308..4f71ce95c 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 * })