diff --git a/lib/async.js b/lib/async.js index 312000fe0..f17608541 100644 --- a/lib/async.js +++ b/lib/async.js @@ -720,21 +720,8 @@ _parallel(_eachOfLimit(limit), tasks, callback); }; - async.series = function (tasks, callback) { - callback = callback || noop; - var results = _isArrayLike(tasks) ? [] : {}; - - async.eachOfSeries(tasks, function (task, key, callback) { - task(_restParam(function (err, args) { - if (args.length <= 1) { - args = args[0]; - } - results[key] = args; - callback(err); - })); - }, function (err) { - callback(err, results); - }); + async.series = function(tasks, callback) { + _parallel(async.eachOfSeries, tasks, callback); }; async.iterator = function (tasks) {