Core · class
MemoryStore
Volatile store: the test double, and the fallback when nothing persists.
Explained in The loop.
class MemoryStore implements KeyValueStoreimport { MemoryStore } from '@driftengine/core';Methods
read
read(key: string): string | null| Parameter | Type | Description |
|---|---|---|
key | string |
write
write(key: string, value: string): void| Parameter | Type | Description |
|---|---|---|
key | string | |
value | string |
remove
remove(key: string): void| Parameter | Type | Description |
|---|---|---|
key | string |
hydrate
hydrate(entries: Iterable<readonly [string, string]>): voidSeed from an asynchronous backend before anything reads.
| Parameter | Type | Description |
|---|---|---|
entries | Iterable<readonly [string, string]> |