From d1291f67551c58168af43698a359cb5ddfd266b0 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Thu, 3 Nov 2016 01:33:53 +0100 Subject: node_modules --- node_modules/async/race.js | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'node_modules/async/race.js') diff --git a/node_modules/async/race.js b/node_modules/async/race.js index 384ea1012..4d0625b9b 100644 --- a/node_modules/async/race.js +++ b/node_modules/async/race.js @@ -9,10 +9,6 @@ var _isArray = require('lodash/isArray'); var _isArray2 = _interopRequireDefault(_isArray); -var _arrayEach = require('lodash/_arrayEach'); - -var _arrayEach2 = _interopRequireDefault(_arrayEach); - var _noop = require('lodash/noop'); var _noop2 = _interopRequireDefault(_noop); @@ -25,7 +21,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de /** * Runs the `tasks` array of functions in parallel, without waiting until the - * previous function has completed. Once any the `tasks` completed or pass an + * previous function has completed. Once any of the `tasks` complete or pass an * error to its callback, the main `callback` is immediately called. It's * equivalent to `Promise.race()`. * @@ -64,8 +60,8 @@ function race(tasks, callback) { callback = (0, _once2.default)(callback || _noop2.default); if (!(0, _isArray2.default)(tasks)) return callback(new TypeError('First argument to race must be an array of functions')); if (!tasks.length) return callback(); - (0, _arrayEach2.default)(tasks, function (task) { - task(callback); - }); + for (var i = 0, l = tasks.length; i < l; i++) { + tasks[i](callback); + } } module.exports = exports['default']; \ No newline at end of file -- cgit v1.2.3