diff options
author | Graeme Yeates <yeatesgraeme@gmail.com> | 2016-01-04 09:10:08 -0500 |
---|---|---|
committer | Graeme Yeates <yeatesgraeme@gmail.com> | 2016-01-04 09:10:08 -0500 |
commit | 85f5be9ccbd1055178d14162916d9757303d468c (patch) | |
tree | 9afd7dd7ebaea267428feb428f55e818ce9875a9 /lib/auto.js | |
parent | 08af90ee6d5ef09447b5abfb0cfb6fcff35ecb2e (diff) | |
download | async-85f5be9ccbd1055178d14162916d9757303d468c.tar.gz |
Avoid including lodash string parsing in bundle
Diffstat (limited to 'lib/auto.js')
-rw-r--r-- | lib/auto.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/auto.js b/lib/auto.js index 35fd012..262e59b 100644 --- a/lib/auto.js +++ b/lib/auto.js @@ -2,6 +2,7 @@ import arrayEach from 'lodash/internal/arrayEach'; import arrayEvery from 'lodash/internal/arrayEvery'; +import baseHas from 'lodash/internal/baseHas'; import forOwn from 'lodash/object/forOwn'; import indexOf from 'lodash/array/indexOf'; import isArray from 'lodash/lang/isArray'; @@ -85,9 +86,10 @@ export default function (tasks, concurrency, callback) { } } function ready() { - return runningTasks < concurrency && arrayEvery(requires, function (x) { - return results.hasOwnProperty(x); - }) && !results.hasOwnProperty(k); + return runningTasks < concurrency && !baseHas(results, k) && + arrayEvery(requires, function (x) { + return baseHas(results, x); + }); } if (ready()) { runningTasks++; |