123456789101112131415161718192021222324252627282930 |
- import eq from './eq.js';
- import isArrayLike from './isArrayLike.js';
- import isIndex from './_isIndex.js';
- import isObject from './isObject.js';
- function isIterateeCall(value, index, object) {
- if (!isObject(object)) {
- return false;
- }
- var type = typeof index;
- if (type == 'number'
- ? (isArrayLike(object) && isIndex(index, object.length))
- : (type == 'string' && index in object)
- ) {
- return eq(object[index], value);
- }
- return false;
- }
- export default isIterateeCall;
|