1 var baseSortedIndex = require('./_baseSortedIndex'),
5 * This method is like `_.indexOf` except that it performs a binary
6 * search on a sorted `array`.
12 * @param {Array} array The array to inspect.
13 * @param {*} value The value to search for.
14 * @returns {number} Returns the index of the matched value, else `-1`.
17 * _.sortedIndexOf([4, 5, 5, 5, 6], 5);
20 function sortedIndexOf(array, value) {
21 var length = array == null ? 0 : array.length;
23 var index = baseSortedIndex(array, value);
24 if (index < length && eq(array[index], value)) {
31 module.exports = sortedIndexOf;