UNPKG

@newdash/newdash

Version:

javascript/typescript utility library

15 lines (14 loc) 636 B
/** * The base implementation of `sortedIndex` and `sortedLastIndex` which * performs a binary search of `array` to determine the index at which `value` * should be inserted into `array` in order to maintain its sort order. * * @private * @param {Array} array The sorted array to inspect. * @param {*} value The value to evaluate. * @param {boolean} [retHighest] Specify returning the highest qualified index. * @returns {number} Returns the index at which `value` should be inserted * into `array`. */ export function baseSortedIndex(array: any[], value: any, retHighest?: boolean): number; export default baseSortedIndex;