MCPcopy Create free account
hub / github.com/RubyLouvre/anu / isIterateeCall

Function isIterateeCall

test/babel.js:21916–21925  ·  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 {boolean} Returns `tru

(value, index, object)

Source from the content-addressed store, hash-verified

21914 * else `false`.
21915 */
21916 function isIterateeCall(value, index, object) {
21917 if (!isObject(object)) {
21918 return false;
21919 }
21920 var type = typeof index === 'undefined' ? 'undefined' : _typeof(index);
21921 if (type == 'number' ? isArrayLike(object) && isIndex(index, object.length) : type == 'string' && index in object) {
21922 return eq(object[index], value);
21923 }
21924 return false;
21925 }
21926
21927 module.exports = isIterateeCall;
21928

Callers 3

createAssignerFunction · 0.85
repeatFunction · 0.85
babel.jsFile · 0.85

Calls 4

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

Tested by

no test coverage detected