Skip to content

Commit ded9837

Browse files
committed
Slim down JsonMap.
1 parent 165aaf9 commit ded9837

File tree

1 file changed

+2
-18
lines changed

1 file changed

+2
-18
lines changed

browser-extension/src/lib/jsonmap.ts

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -27,24 +27,8 @@ export class JsonMap<K, V> {
2727
return this.map.size
2828
}
2929

30-
*values(): IterableIterator<V> {
31-
yield* this.map.values()
32-
}
33-
34-
*entries(): IterableIterator<[K, V]> {
35-
for (const [stringKey, value] of this.map.entries()) {
36-
yield [JSON.parse(stringKey) as K, value]
37-
}
38-
}
39-
40-
*keys(): IterableIterator<K> {
41-
for (const stringKey of this.map.keys()) {
42-
yield JSON.parse(stringKey) as K
43-
}
44-
}
45-
46-
[Symbol.iterator](): IterableIterator<[K, V]> {
47-
return this.entries()
30+
[Symbol.iterator](): IterableIterator<[string, V]> {
31+
return this.map.entries()
4832
}
4933
}
5034

0 commit comments

Comments
 (0)