00001 var eq = require('./eq'), 00002 isArrayLike = require('./isArrayLike'), 00003 isIndex = require('./_isIndex'), 00004 isObject = require('./isObject'); 00005 00016 function isIterateeCall(value, index, object) { 00017 if (!isObject(object)) { 00018 return false; 00019 } 00020 var type = typeof index; 00021 if (type == 'number' 00022 ? (isArrayLike(object) && isIndex(index, object.length)) 00023 : (type == 'string' && index in object) 00024 ) { 00025 return eq(object[index], value); 00026 } 00027 return false; 00028 } 00029 00030 module.exports = isIterateeCall;