Skip to main content
Module

x/lodash_es/mod.ts>sortedIndex

lodash for deno use
Latest
function sortedIndex
import { sortedIndex } from "https://deno.land/x/lodash_es@v0.0.2/mod.ts";

Uses a binary search to determine the lowest index at which value should be inserted into array in order to maintain its sort order.

Examples

_.sortedIndex([30, 50], 40); // => 1

Parameters

array

The sorted array to inspect.

value

The value to evaluate.