The sorted array to inspect.
The value to evaluate.
The iteratee invoked per element.
Returns the index at which value
should be inserted into array
.
5.11.0
const objects = [{ 'n': 4 }, { 'n': 5 }]
sortedIndexBy(objects, { 'n': 4 }, ({ n }) => n)
// => 0
This method is like
sortedIndex
except that it acceptsiteratee
which is invoked forvalue
and each element ofarray
to compute their sort ranking. The iteratee is invoked with one argument: (value).