(array, compareFn, offset = 0)
| 213 | |
| 214 | // Return the first index for which compareFn(item) is >= 0; |
| 215 | _find(array, compareFn, offset = 0) { |
| 216 | let minIndex = offset; |
| 217 | let maxIndex = array.length - 1; |
| 218 | while (minIndex < maxIndex) { |
| 219 | const midIndex = minIndex + (((maxIndex - minIndex) / 2) | 0); |
| 220 | if (compareFn(array[midIndex]) < 0) { |
| 221 | minIndex = midIndex + 1; |
| 222 | } else { |
| 223 | maxIndex = midIndex; |
| 224 | } |
| 225 | } |
| 226 | return minIndex; |
| 227 | } |
| 228 | |
| 229 | getBreakdown(keyFunction, collect = false) { |
| 230 | if (keyFunction || collect) { |