* Builds the index from a collection of entries
(entries: Iterable<[TKey, any]>)
| 156 | * Builds the index from a collection of entries |
| 157 | */ |
| 158 | build(entries: Iterable<[TKey, any]>): void { |
| 159 | this.clear() |
| 160 | |
| 161 | for (const [key, item] of entries) { |
| 162 | this.add(key, item) |
| 163 | } |
| 164 | } |
| 165 | |
| 166 | /** |
| 167 | * Clears all data from the index |