1 | import eq from './eq.js';
|
2 | import isArrayLike from './isArrayLike.js';
|
3 | import isIndex from './_isIndex.js';
|
4 | import isObject from './isObject.js';
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 | function isIterateeCall(value, index, object) {
|
17 | if (!isObject(object)) {
|
18 | return false;
|
19 | }
|
20 | var type = typeof index;
|
21 | if (type == 'number'
|
22 | ? (isArrayLike(object) && isIndex(index, object.length))
|
23 | : (type == 'string' && index in object)
|
24 | ) {
|
25 | return eq(object[index], value);
|
26 | }
|
27 | return false;
|
28 | }
|
29 |
|
30 | export default isIterateeCall;
|