source: imaps-frontend/node_modules/lodash-es/_baseIndexOf.js

main
Last change on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 657 bytes
Line 
1import baseFindIndex from './_baseFindIndex.js';
2import baseIsNaN from './_baseIsNaN.js';
3import strictIndexOf from './_strictIndexOf.js';
4
5/**
6 * The base implementation of `_.indexOf` without `fromIndex` bounds checks.
7 *
8 * @private
9 * @param {Array} array The array to inspect.
10 * @param {*} value The value to search for.
11 * @param {number} fromIndex The index to search from.
12 * @returns {number} Returns the index of the matched value, else `-1`.
13 */
14function baseIndexOf(array, value, fromIndex) {
15 return value === value
16 ? strictIndexOf(array, value, fromIndex)
17 : baseFindIndex(array, baseIsNaN, fromIndex);
18}
19
20export default baseIndexOf;
Note: See TracBrowser for help on using the repository browser.