mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-04 17:07:49 +00:00
Bump to v3.8.0.
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
var getLength = require('./getLength'),
|
||||
var isArrayLike = require('./isArrayLike'),
|
||||
isIndex = require('./isIndex'),
|
||||
isLength = require('./isLength'),
|
||||
isObject = require('../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