mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-02 16:17:50 +00:00
Bump to v3.8.0.
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import getLength from './getLength';
|
||||
import isArrayLike from './isArrayLike';
|
||||
import isIndex from './isIndex';
|
||||
import isLength from './isLength';
|
||||
import isObject from '../lang/isObject';
|
||||
|
||||
/**
|
||||
@@ -17,13 +16,9 @@ function isIterateeCall(value, index, object) {
|
||||
return false;
|
||||
}
|
||||
var type = typeof index;
|
||||
if (type == 'number') {
|
||||
var length = getLength(object),
|
||||
prereq = isLength(length) && isIndex(index, length);
|
||||
} else {
|
||||
prereq = type == 'string' && index in object;
|
||||
}
|
||||
if (prereq) {
|
||||
if (type == 'number'
|
||||
? (isArrayLike(object) && isIndex(index, object.length))
|
||||
: (type == 'string' && index in object)) {
|
||||
var other = object[index];
|
||||
return value === value ? (value === other) : (other !== other);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user