[Pkg-javascript-commits] [node-async] 439/480: in `.auto` check “is it an array?” instead of “is it a function?”
Jonas Smedegaard
js at moszumanska.debian.org
Fri May 2 08:58:50 UTC 2014
This is an automated email from the git hooks/post-receive script.
js pushed a commit to branch master
in repository node-async.
commit c558dbe1577a3ca6a3b57beb93dc604887824004
Author: Mithgol <getgit at mithgol.ru>
Date: Sun Mar 30 22:13:53 2014 -0700
in `.auto` check “is it an array?” instead of “is it a function?”
---
lib/async.js | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/lib/async.js b/lib/async.js
index 40f531d..201e448 100755
--- a/lib/async.js
+++ b/lib/async.js
@@ -34,11 +34,6 @@
return _toString.call(obj) === '[object Array]';
};
- var _isFunction = function (obj) {
- return obj instanceof Function ||
- _toString.call(obj) === '[object Function]';
- };
-
var _each = function (arr, iterator) {
if (arr.forEach) {
return arr.forEach(iterator);
@@ -446,7 +441,7 @@
});
_each(keys, function (k) {
- var task = _isFunction(tasks[k]) ? [tasks[k]]: tasks[k];
+ var task = _isArray(tasks[k]) ? tasks[k]: [tasks[k]];
var taskCallback = function (err) {
var args = Array.prototype.slice.call(arguments, 1);
if (args.length <= 1) {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-async.git
More information about the Pkg-javascript-commits
mailing list