* The base implementation of `_.indexOf` without support for binary searches * or `fromIndex` constraints. * * @private * @param {Array} array The array to search. * @param {*} value The value to search for. * @param {number} [fromIndex=0] The index to search from. * @returns {n
(array, value, fromIndex)
| 35302 | * @returns {number} Returns the index of the matched value or `-1`. |
| 35303 | */ |
| 35304 | function baseIndexOf(array, value, fromIndex) { |
| 35305 | var index = (fromIndex || 0) - 1, |
| 35306 | length = array ? array.length : 0; |
| 35307 | |
| 35308 | while (++index < length) { |
| 35309 | if (array[index] === value) { |
| 35310 | return index; |
| 35311 | } |
| 35312 | } |
| 35313 | return -1; |
| 35314 | } |
| 35315 | |
| 35316 | /** |
| 35317 | * An implementation of `_.contains` for cache objects that mimics the return |
no outgoing calls
no test coverage detected