180e92079090bfe34accca942ec5eaab6b1f6ebde35c079dd79e1a24d2e670d15f8ca3f7ba34e9dbc3d4a364f12f531c3d4826ebfedc941914f142764ac2a6 657 B

1234567891011121314151617181920
  1. import baseFindIndex from './_baseFindIndex.js';
  2. import baseIsNaN from './_baseIsNaN.js';
  3. import strictIndexOf from './_strictIndexOf.js';
  4. /**
  5. * The base implementation of `_.indexOf` without `fromIndex` bounds checks.
  6. *
  7. * @private
  8. * @param {Array} array The array to inspect.
  9. * @param {*} value The value to search for.
  10. * @param {number} fromIndex The index to search from.
  11. * @returns {number} Returns the index of the matched value, else `-1`.
  12. */
  13. function baseIndexOf(array, value, fromIndex) {
  14. return value === value
  15. ? strictIndexOf(array, value, fromIndex)
  16. : baseFindIndex(array, baseIsNaN, fromIndex);
  17. }
  18. export default baseIndexOf;