Skip to content

Commit e5d7148

Browse files
committed
Update built files
1 parent 7e84a4f commit e5d7148

File tree

3 files changed

+20
-6
lines changed

3 files changed

+20
-6
lines changed

dist/async.js

+18-4
Original file line numberDiff line numberDiff line change
@@ -664,10 +664,13 @@ var reIsUint = /^(?:0|[1-9]\d*)$/;
664664
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
665665
*/
666666
function isIndex(value, length) {
667+
var type = typeof value;
667668
length = length == null ? MAX_SAFE_INTEGER$1 : length;
669+
668670
return !!length &&
669-
(typeof value == 'number' || reIsUint.test(value)) &&
670-
(value > -1 && value % 1 == 0 && value < length);
671+
(type == 'number' ||
672+
(type != 'symbol' && reIsUint.test(value))) &&
673+
(value > -1 && value % 1 == 0 && value < length);
671674
}
672675

673676
/** `Object#toString` result references. */
@@ -753,6 +756,14 @@ var freeProcess = moduleExports$1 && freeGlobal.process;
753756
/** Used to access faster Node.js helpers. */
754757
var nodeUtil = (function() {
755758
try {
759+
// Use `util.types` for Node.js 10+.
760+
var types = freeModule$1 && freeModule$1.require && freeModule$1.require('util').types;
761+
762+
if (types) {
763+
return types;
764+
}
765+
766+
// Legacy `process.binding('util')` for Node.js < 10.
756767
return freeProcess && freeProcess.binding && freeProcess.binding('util');
757768
} catch (e) {}
758769
}());
@@ -968,6 +979,7 @@ function _eachOfLimit(limit) {
968979
var nextElem = iterator(obj);
969980
var done = false;
970981
var running = 0;
982+
var looping = false;
971983

972984
function iterateeCallback(err, value) {
973985
running -= 1;
@@ -979,12 +991,13 @@ function _eachOfLimit(limit) {
979991
done = true;
980992
return callback(null);
981993
}
982-
else {
994+
else if (!looping) {
983995
replenish();
984996
}
985997
}
986998

987999
function replenish () {
1000+
looping = true;
9881001
while (running < limit && !done) {
9891002
var elem = nextElem();
9901003
if (elem === null) {
@@ -997,6 +1010,7 @@ function _eachOfLimit(limit) {
9971010
running += 1;
9981011
iteratee(elem.value, elem.key, onlyOnce(iterateeCallback));
9991012
}
1013+
looping = false;
10001014
}
10011015

10021016
replenish();
@@ -3817,7 +3831,7 @@ function memoize(fn, hasher) {
38173831

38183832
/**
38193833
* Calls `callback` on a later loop around the event loop. In Node.js this just
3820-
* calls `process.nextTicl`. In the browser it will use `setImmediate` if
3834+
* calls `process.nextTick`. In the browser it will use `setImmediate` if
38213835
* available, otherwise `setTimeout(callback, 0)`, which means other higher
38223836
* priority events may precede the execution of `callback`.
38233837
*

0 commit comments

Comments
 (0)