Function
fromIterable
(entries: Iterable<readonly [string, V]>)
Source from the content-addressed store, hash-verified
| 144 | |
| 145 | /** @internal */ |
| 146 | export const fromIterable = <V>(entries: Iterable<readonly [string, V]>) => { |
| 147 | let trie = empty<V>() |
| 148 | for (const [key, value] of entries) { |
| 149 | trie = insert(trie, key, value) |
| 150 | } |
| 151 | return trie |
| 152 | } |
| 153 | |
| 154 | /** @internal */ |
| 155 | export const make = <Entries extends Array<readonly [string, any]>>(...entries: Entries): TR.Trie< |
Tested by
no test coverage detected