* Iterates over all stored items without imposing bucket sort order. * @returns {Iterator<T>} the iterator
()
| 274 | * @returns {Iterator<T>} the iterator |
| 275 | */ |
| 276 | [Symbol.iterator]() { |
| 277 | /** @type {Iterator<T>[]} */ |
| 278 | const iterators = []; |
| 279 | this._appendIterators(iterators); |
| 280 | iterators.reverse(); |
| 281 | let currentIterator = |
| 282 | /** @type {Iterator<T>} */ |
| 283 | (iterators.pop()); |
| 284 | return { |
| 285 | next: () => { |
| 286 | const res = currentIterator.next(); |
| 287 | if (res.done) { |
| 288 | if (iterators.length === 0) return res; |
| 289 | currentIterator = /** @type {Iterator<T>} */ (iterators.pop()); |
| 290 | return currentIterator.next(); |
| 291 | } |
| 292 | return res; |
| 293 | } |
| 294 | }; |
| 295 | } |
| 296 | } |
| 297 | |
| 298 | module.exports = LazyBucketSortedSet; |
nothing calls this directly
no test coverage detected