summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Early <alexander.early@gmail.com>2017-04-01 16:12:45 -0700
committerAlexander Early <alexander.early@gmail.com>2017-04-01 16:12:45 -0700
commitfab1e45a4a61659049eb43460a1b6183d7429c4d (patch)
tree64b8273b283afef775d7fdda8e49cea735786e91
parent94a8b2d18bf10cca67cf4c308253f642bbb2b160 (diff)
downloadasync-fab1e45a4a61659049eb43460a1b6183d7429c4d.tar.gz
fix lint error
-rw-r--r--lib/until.js19
-rw-r--r--lib/whilst.js2
2 files changed, 10 insertions, 11 deletions
diff --git a/lib/until.js b/lib/until.js
index 7b0b0b5..942a381 100644
--- a/lib/until.js
+++ b/lib/until.js
@@ -1,9 +1,9 @@
import whilst from './whilst';
/**
- * Repeatedly call `fn` until `test` returns `true`. Calls `callback` when
+ * Repeatedly call `iteratee` until `test` returns `true`. Calls `callback` when
* stopped, or an error occurs. `callback` will be passed an error and any
- * arguments passed to the final `fn`'s callback.
+ * arguments passed to the final `iteratee`'s callback.
*
* The inverse of [whilst]{@link module:ControlFlow.whilst}.
*
@@ -14,17 +14,16 @@ import whilst from './whilst';
* @see [async.whilst]{@link module:ControlFlow.whilst}
* @category Control Flow
* @param {Function} test - synchronous truth test to perform before each
- * execution of `fn`. Invoked with ().
- * @param {Function} fn - A function which is called each time `test` fails.
- * The function is passed a `callback(err)`, which must be called once it has
- * completed with an optional `err` argument. Invoked with (callback).
+ * execution of `iteratee`. Invoked with ().
+ * @param {AsyncFunction} iteratee - An async function which is called each time
+ * `test` fails. Invoked with (callback).
* @param {Function} [callback] - A callback which is called after the test
- * function has passed and repeated execution of `fn` has stopped. `callback`
- * will be passed an error and any arguments passed to the final `fn`'s
+ * function has passed and repeated execution of `iteratee` has stopped. `callback`
+ * will be passed an error and any arguments passed to the final `iteratee`'s
* callback. Invoked with (err, [results]);
*/
-export default function until(test, fn, callback) {
+export default function until(test, iteratee, callback) {
whilst(function() {
return !test.apply(this, arguments);
- }, fn, callback);
+ }, iteratee, callback);
}
diff --git a/lib/whilst.js b/lib/whilst.js
index dc56a8a..57edad6 100644
--- a/lib/whilst.js
+++ b/lib/whilst.js
@@ -15,7 +15,7 @@ import wrapAsync from './internal/wrapAsync';
* @category Control Flow
* @param {Function} test - synchronous truth test to perform before each
* execution of `iteratee`. Invoked with ().
- * @param {AsyncFunction} fn - An async function which is called each time
+ * @param {AsyncFunction} iteratee - An async function which is called each time
* `test` passes. Invoked with (callback).
* @param {Function} [callback] - A callback which is called after the test
* function has failed and repeated execution of `iteratee` has stopped. `callback`