MCPcopy
hub / github.com/lodash/lodash / isIterateeCall

Function isIterateeCall

lodash.js:6375–6387  ·  view source on GitHub ↗

* Checks if the given arguments are from an iteratee call. * * @private * @param {*} value The potential iteratee value argument. * @param {*} index The potential iteratee index or key argument. * @param {*} object The potential iteratee object argument. * @returns {boo

(value, index, object)

Source from the content-addressed store, hash-verified

6373 * else `false`.
6374 */
6375 function isIterateeCall(value, index, object) {
6376 if (!isObject(object)) {
6377 return false;
6378 }
6379 var type = typeof index;
6380 if (type == 'number'
6381 ? (isArrayLike(object) && isIndex(index, object.length))
6382 : (type == 'string' && index in object)
6383 ) {
6384 return eq(object[index], value);
6385 }
6386 return false;
6387 }
6388
6389 /**
6390 * Checks if `value` is a property name and not a property path.

Callers 13

createAssignerFunction · 0.85
createRangeFunction · 0.85
chunkFunction · 0.85
fillFunction · 0.85
sliceFunction · 0.85
everyFunction · 0.85
sampleSizeFunction · 0.85
someFunction · 0.85
lodash.jsFile · 0.85
randomFunction · 0.85
repeatFunction · 0.85
splitFunction · 0.85

Calls 4

isObjectFunction · 0.85
isArrayLikeFunction · 0.85
isIndexFunction · 0.85
eqFunction · 0.85

Tested by

no test coverage detected