|
Last change
on this file since ba17441 was a762898, checked in by istevanoska <ilinastevanoska@…>, 5 months ago |
|
Added visualizations
|
-
Property mode
set to
100644
|
|
File size:
621 bytes
|
| Line | |
|---|
| 1 | import { isIndex } from './isIndex.mjs';
|
|---|
| 2 | import { isArrayLike } from '../predicate/isArrayLike.mjs';
|
|---|
| 3 | import { isObject } from '../predicate/isObject.mjs';
|
|---|
| 4 | import { isEqualsSameValueZero } from '../../_internal/isEqualsSameValueZero.mjs';
|
|---|
| 5 |
|
|---|
| 6 | function isIterateeCall(value, index, object) {
|
|---|
| 7 | if (!isObject(object)) {
|
|---|
| 8 | return false;
|
|---|
| 9 | }
|
|---|
| 10 | if ((typeof index === 'number' && isArrayLike(object) && isIndex(index) && index < object.length) ||
|
|---|
| 11 | (typeof index === 'string' && index in object)) {
|
|---|
| 12 | return isEqualsSameValueZero(object[index], value);
|
|---|
| 13 | }
|
|---|
| 14 | return false;
|
|---|
| 15 | }
|
|---|
| 16 |
|
|---|
| 17 | export { isIterateeCall };
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.