* Simple in-memory key-value store
| 17 | * Simple in-memory key-value store |
| 18 | */ |
| 19 | class SimpleMemoryStore { |
| 20 | private data = new Map<string, unknown>(); |
| 21 | |
| 22 | set(key: string, value: unknown): void { |
| 23 | this.data.set(key, value); |
| 24 | } |
| 25 | |
| 26 | get(key: string): unknown { |
| 27 | return this.data.get(key); |
| 28 | } |
| 29 | |
| 30 | delete(key: string): boolean { |
| 31 | return this.data.delete(key); |
| 32 | } |
| 33 | |
| 34 | clear(): void { |
| 35 | this.data.clear(); |
| 36 | } |
| 37 | |
| 38 | get size(): number { |
| 39 | return this.data.size; |
| 40 | } |
| 41 | } |
| 42 | |
| 43 | /** |
| 44 | * Typed array store for vectors |
nothing calls this directly
no outgoing calls
no test coverage detected