summaryrefslogtreecommitdiff
path: root/lib/async.js
diff options
context:
space:
mode:
authorAlexander Early <alexander.early@gmail.com>2015-10-25 17:16:46 -0700
committerAlexander Early <alexander.early@gmail.com>2015-10-25 17:16:46 -0700
commit4a536f12d4126bda284869d0756956370e53ee21 (patch)
tree537f1b5982b60f779f6100f3268b931cddaa569d /lib/async.js
parentfbeab9b9979ebd7d5987592e01d25328ee410f56 (diff)
downloadasync-4a536f12d4126bda284869d0756956370e53ee21.tar.gz
move concurrency arg position in auto (#637)
Diffstat (limited to 'lib/async.js')
-rw-r--r--lib/async.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/async.js b/lib/async.js
index 644dccb..beb1372 100644
--- a/lib/async.js
+++ b/lib/async.js
@@ -509,7 +509,12 @@
}
};
- async.auto = function (tasks, callback, concurrency) {
+ async.auto = function (tasks, concurrency, callback) {
+ if (!callback) {
+ // concurrency is optional, shift the args.
+ callback = concurrency;
+ concurrency = null;
+ }
callback = _once(callback || noop);
var keys = _keys(tasks);
var remainingTasks = keys.length;