simontonsoftware / s-libs

A collection of libraries for any of javascript, rxjs, or angular.
MIT License
43 stars 5 forks source link

Bug in micro-dash's sortedIndex #106

Closed jritzi closed 1 year ago

jritzi commented 1 year ago

Both underscore and lodash return 1 for sortedIndex([0], 1), but micro-dash returns 0. It looks like the - 1 isn't needed when initializing max:

let max = array ? array.length : 0;