source: node_modules/es-toolkit/dist/compat/array/sortedLastIndex.d.ts

Last change on this file was a762898, checked in by istevanoska <ilinastevanoska@…>, 5 months ago

Added visualizations

  • Property mode set to 100644
File size: 571 bytes
Line 
1/**
2 * Uses a binary search to determine the highest index at which `value`
3 * should be inserted into `array` in order to maintain its sort order.
4 *
5 * @category Array
6 * @param {ArrayLike<T> | null | undefined} array The sorted array to inspect.
7 * @param {T} value The value to evaluate.
8 * @returns {number} Returns the index at which `value` should be inserted
9 * into `array`.
10 * @example
11 * sortedIndex([4, 5, 5, 5, 6], 5)
12 * // => 4
13 */
14declare function sortedLastIndex<T>(array: ArrayLike<T> | null | undefined, value: T): number;
15
16export { sortedLastIndex };
Note: See TracBrowser for help on using the repository browser.