Skip to main content
Latest
function sortedLastIndex
import { sortedLastIndex } from "https://deno.land/x/lodash_es@v0.0.2/mod.ts";

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.

Examples

_.sortedLastIndex([4, 5, 5, 5, 6], 5); // => 4

Parameters

array

The sorted array to inspect.

value

The value to evaluate.