@@ -664,10 +664,13 @@ var reIsUint = /^(?:0|[1-9]\d*)$/;
664
664
* @returns {boolean } Returns `true` if `value` is a valid index, else `false`.
665
665
*/
666
666
function isIndex ( value , length ) {
667
+ var type = typeof value ;
667
668
length = length == null ? MAX_SAFE_INTEGER$1 : length ;
669
+
668
670
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 ) ;
671
674
}
672
675
673
676
/** `Object#toString` result references. */
@@ -753,6 +756,14 @@ var freeProcess = moduleExports$1 && freeGlobal.process;
753
756
/** Used to access faster Node.js helpers. */
754
757
var nodeUtil = ( function ( ) {
755
758
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.
756
767
return freeProcess && freeProcess . binding && freeProcess . binding ( 'util' ) ;
757
768
} catch ( e ) { }
758
769
} ( ) ) ;
@@ -968,6 +979,7 @@ function _eachOfLimit(limit) {
968
979
var nextElem = iterator ( obj ) ;
969
980
var done = false ;
970
981
var running = 0 ;
982
+ var looping = false ;
971
983
972
984
function iterateeCallback ( err , value ) {
973
985
running -= 1 ;
@@ -979,12 +991,13 @@ function _eachOfLimit(limit) {
979
991
done = true ;
980
992
return callback ( null ) ;
981
993
}
982
- else {
994
+ else if ( ! looping ) {
983
995
replenish ( ) ;
984
996
}
985
997
}
986
998
987
999
function replenish ( ) {
1000
+ looping = true ;
988
1001
while ( running < limit && ! done ) {
989
1002
var elem = nextElem ( ) ;
990
1003
if ( elem === null ) {
@@ -997,6 +1010,7 @@ function _eachOfLimit(limit) {
997
1010
running += 1 ;
998
1011
iteratee ( elem . value , elem . key , onlyOnce ( iterateeCallback ) ) ;
999
1012
}
1013
+ looping = false ;
1000
1014
}
1001
1015
1002
1016
replenish ( ) ;
@@ -3817,7 +3831,7 @@ function memoize(fn, hasher) {
3817
3831
3818
3832
/**
3819
3833
* 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
3821
3835
* available, otherwise `setTimeout(callback, 0)`, which means other higher
3822
3836
* priority events may precede the execution of `callback`.
3823
3837
*
0 commit comments