123456789101112131415161718192021222324252627282930313233343536373839404142 |
- import baseIndexOf from './_baseIndexOf.js';
- import toInteger from './toInteger.js';
- var nativeMax = Math.max;
- function indexOf(array, value, fromIndex) {
- var length = array == null ? 0 : array.length;
- if (!length) {
- return -1;
- }
- var index = fromIndex == null ? 0 : toInteger(fromIndex);
- if (index < 0) {
- index = nativeMax(length + index, 0);
- }
- return baseIndexOf(array, value, index);
- }
- export default indexOf;
|