Urara-Blog/node_modules/.pnpm-store/v3/files/42/39b55372aa7acda3f58cb6479cba8007c5912221ef768037f22c7fee987e5753301efbed7f2bd5db93557a3be0b3504a2386d9cf0b61832aef117bd376bbce
2022-08-14 01:14:53 +08:00

25 lines
679 B
Text

var baseSortedIndex = require('./_baseSortedIndex');
/**
* This method is like `_.sortedIndex` except that it returns the highest
* index at which `value` should be inserted into `array` in order to
* maintain its sort order.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Array
* @param {Array} array The sorted array to inspect.
* @param {*} value The value to evaluate.
* @returns {number} Returns the index at which `value` should be inserted
* into `array`.
* @example
*
* _.sortedLastIndex([4, 5, 5, 5, 6], 5);
* // => 4
*/
function sortedLastIndex(array, value) {
return baseSortedIndex(array, value, true);
}
module.exports = sortedLastIndex;