MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / isIterateeCall

Function isIterateeCall

lib/web/jshint.js:5635–5651  ·  view source on GitHub ↗

* Checks if the provided 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 {

(value, index, object)

Source from the content-addressed store, hash-verified

5633 * @returns {boolean} Returns `true` if the arguments are from an iteratee call, else `false`.
5634 */
5635 function isIterateeCall(value, index, object) {
5636 if (!isObject(object)) {
5637 return false;
5638 }
5639 var type = typeof index;
5640 if (type == 'number') {
5641 var length = getLength(object),
5642 prereq = isLength(length) && isIndex(index, length);
5643 } else {
5644 prereq = type == 'string' && index in object;
5645 }
5646 if (prereq) {
5647 var other = object[index];
5648 return value === value ? (value === other) : (other !== other);
5649 }
5650 return false;
5651 }
5652
5653 /**
5654 * Checks if `value` is a property name and not a property path.

Callers 15

createAssignerFunction · 0.85
curryFuncFunction · 0.85
createExtremumFunction · 0.85
chunkFunction · 0.85
dropFunction · 0.85
dropRightFunction · 0.85
fillFunction · 0.85
flattenFunction · 0.85
sliceFunction · 0.85
takeFunction · 0.85
takeRightFunction · 0.85
uniqFunction · 0.85

Calls 3

isLengthFunction · 0.85
isIndexFunction · 0.85
isObjectFunction · 0.70

Tested by

no test coverage detected