source: node_modules/es-toolkit/dist/compat/_internal/isIterateeCall.mjs

Last change on this file was a762898, checked in by istevanoska <ilinastevanoska@…>, 5 months ago

Added visualizations

  • Property mode set to 100644
File size: 621 bytes
RevLine 
[a762898]1import { isIndex } from './isIndex.mjs';
2import { isArrayLike } from '../predicate/isArrayLike.mjs';
3import { isObject } from '../predicate/isObject.mjs';
4import { isEqualsSameValueZero } from '../../_internal/isEqualsSameValueZero.mjs';
5
6function 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
17export { isIterateeCall };
Note: See TracBrowser for help on using the repository browser.