mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-04 08:57:49 +00:00
lodash: Sync with Underscore.js commits. [jddalton]
Former-commit-id: 0a92b5c9dcd0ff5c4c712e083fa60556ebb1d96a
This commit is contained in:
@@ -1753,7 +1753,7 @@ _.sortBy([1, 2, 3, 4, 5, 6], function(num) { return Math.sin(num); });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_.sortedIndex" href="https://github.com/bestiejs/lodash/blob/master/lodash.js#L844" title="View in source">`_.sortedIndex(array, value [, callback])`</a>
|
||||
Uses a binary search to determine the index at which the `value` should be inserted into the `collection` in order to maintain the `collection`'s sorted order. If `callback` is passed, it will be executed for each value in the `collection` to compute their sort ranking. The `callback` is invoked with `1` arguments.
|
||||
Uses a binary search to determine the smallest index at which the `value` should be inserted into the `collection` in order to maintain the sort order of the `collection`. If `callback` is passed, it will be executed for each value in the `collection` to compute their sort ranking. The `callback` is invoked with `1` argument.
|
||||
[▲][1]
|
||||
|
||||
#### Arguments
|
||||
|
||||
Reference in New Issue
Block a user