source: imaps-frontend/node_modules/lodash-es/sortedLastIndex.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: 677 bytes
Line 
1import baseSortedIndex from './_baseSortedIndex.js';
2
3/**
4 * This method is like `_.sortedIndex` except that it returns the highest
5 * index at which `value` should be inserted into `array` in order to
6 * maintain its sort order.
7 *
8 * @static
9 * @memberOf _
10 * @since 3.0.0
11 * @category Array
12 * @param {Array} array The sorted array to inspect.
13 * @param {*} value The value to evaluate.
14 * @returns {number} Returns the index at which `value` should be inserted
15 * into `array`.
16 * @example
17 *
18 * _.sortedLastIndex([4, 5, 5, 5, 6], 5);
19 * // => 4
20 */
21function sortedLastIndex(array, value) {
22 return baseSortedIndex(array, value, true);
23}
24
25export default sortedLastIndex;
Note: See TracBrowser for help on using the repository browser.