* Scans the specified range of keys, in ascending order by key. * Note: the callback `onFound` must not insert or remove items in the * collection. Doing so may cause incorrect data to be sent to the * callback afterward. * @param low The first key scanned will be greater than or equal t
(
low: K,
high: K,
includeHigh: boolean,
onFound?: (k: K, v: V, counter: number) => { break?: R } | void,
initialCounter?: number,
)
| 327 | * @description Computational complexity: O(number of items scanned + log size) |
| 328 | */ |
| 329 | forRange<R = number>( |
| 330 | low: K, |
| 331 | high: K, |
| 332 | includeHigh: boolean, |
| 333 | onFound?: (k: K, v: V, counter: number) => { break?: R } | void, |
| 334 | initialCounter?: number, |
| 335 | ): R | number { |
| 336 | const r = this._root.forRange( |
| 337 | low, |
| 338 | high, |
| 339 | includeHigh, |
| 340 | false, |
| 341 | this, |
| 342 | initialCounter || 0, |
| 343 | onFound, |
| 344 | ) |
| 345 | return typeof r === `number` ? r : r.break! |
| 346 | } |
| 347 | |
| 348 | /** |
| 349 | * Scans and potentially modifies values for a subsequence of keys. |
no outgoing calls
no test coverage detected