aboutsummaryrefslogtreecommitdiff
path: root/node_modules/async/whilst.js
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2016-11-03 01:33:53 +0100
committerFlorian Dold <florian.dold@gmail.com>2016-11-03 01:33:53 +0100
commitd1291f67551c58168af43698a359cb5ddfd266b0 (patch)
tree55a13ed29fe1915e3f42f1b1b7038dafa2e975a7 /node_modules/async/whilst.js
parentd0a0695fb5d34996850723f7d4b1b59c3df909c2 (diff)
node_modules
Diffstat (limited to 'node_modules/async/whilst.js')
-rw-r--r--node_modules/async/whilst.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/node_modules/async/whilst.js b/node_modules/async/whilst.js
index e81c4608e..9145e2e0f 100644
--- a/node_modules/async/whilst.js
+++ b/node_modules/async/whilst.js
@@ -9,9 +9,9 @@ var _noop = require('lodash/noop');
var _noop2 = _interopRequireDefault(_noop);
-var _rest = require('lodash/rest');
+var _baseRest = require('lodash/_baseRest');
-var _rest2 = _interopRequireDefault(_rest);
+var _baseRest2 = _interopRequireDefault(_baseRest);
var _onlyOnce = require('./internal/onlyOnce');
@@ -20,7 +20,7 @@ var _onlyOnce2 = _interopRequireDefault(_onlyOnce);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
- * Repeatedly call `fn`, while `test` returns `true`. Calls `callback` when
+ * Repeatedly call `iteratee`, while `test` returns `true`. Calls `callback` when
* stopped, or an error occurs.
*
* @name whilst
@@ -29,13 +29,13 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
* @method
* @category Control Flow
* @param {Function} test - synchronous truth test to perform before each
- * execution of `fn`. Invoked with ().
+ * execution of `iteratee`. Invoked with ().
* @param {Function} iteratee - A function which is called each time `test` passes.
* The function is passed a `callback(err)`, which must be called once it has
* completed with an optional `err` argument. Invoked with (callback).
* @param {Function} [callback] - A callback which is called after the test
- * function has failed and repeated execution of `fn` has stopped. `callback`
- * will be passed an error and any arguments passed to the final `fn`'s
+ * function has failed 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]);
* @returns undefined
* @example
@@ -57,7 +57,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
function whilst(test, iteratee, callback) {
callback = (0, _onlyOnce2.default)(callback || _noop2.default);
if (!test()) return callback(null);
- var next = (0, _rest2.default)(function (err, args) {
+ var next = (0, _baseRest2.default)(function (err, args) {
if (err) return callback(err);
if (test()) return iteratee(next);
callback.apply(null, [null].concat(args));