aboutsummaryrefslogtreecommitdiff
path: root/node_modules/async/whilst.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/async/whilst.js')
-rw-r--r--node_modules/async/whilst.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/node_modules/async/whilst.js b/node_modules/async/whilst.js
index 6f9f0c90b..9c4d8f6ca 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('./internal/rest');
+var _slice = require('./internal/slice');
-var _rest2 = _interopRequireDefault(_rest);
+var _slice2 = _interopRequireDefault(_slice);
var _onlyOnce = require('./internal/onlyOnce');
@@ -61,11 +61,12 @@ function whilst(test, iteratee, callback) {
callback = (0, _onlyOnce2.default)(callback || _noop2.default);
var _iteratee = (0, _wrapAsync2.default)(iteratee);
if (!test()) return callback(null);
- var next = (0, _rest2.default)(function (err, args) {
+ var next = function (err /*, ...args*/) {
if (err) return callback(err);
if (test()) return _iteratee(next);
+ var args = (0, _slice2.default)(arguments, 1);
callback.apply(null, [null].concat(args));
- });
+ };
_iteratee(next);
}
module.exports = exports['default']; \ No newline at end of file