Bump to v4.17.5.

This commit is contained in:
John-David Dalton
2018-02-02 21:16:59 -08:00
parent 955537d67f
commit 6339af7cb1
16 changed files with 225 additions and 113 deletions

View File

@@ -15,10 +15,13 @@ define([], function() {
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
*/
function isIndex(value, length) {
var type = typeof value;
length = length == null ? MAX_SAFE_INTEGER : length;
return !!length &&
(typeof value == 'number' || reIsUint.test(value)) &&
(value > -1 && value % 1 == 0 && value < length);
(type == 'number' ||
(type != 'symbol' && reIsUint.test(value))) &&
(value > -1 && value % 1 == 0 && value < length);
}
return isIndex;