Skip to content

@modoki/engine / index / InMemoryBackend

Class: InMemoryBackend ​

In-memory backend — the default. Deterministic, platform-free: the verification harness and unit tests run against this with no localStorage/Capacitor dependency.

Implements ​

Constructors ​

Constructor ​

new InMemoryBackend(): InMemoryBackend

Returns ​

InMemoryBackend

Storage ​

getAll() ​

getAll(prefix): Promise<Record<string, string>>

All entries whose full key starts with prefix, as { fullKey: envelopeString }.

Parameters ​

prefix ​

string

Returns ​

Promise<Record<string, string>>

Implementation of ​

PrefsBackend.getAll


remove() ​

remove(fullKey): Promise<void>

Remove one entry.

Parameters ​

fullKey ​

string

Returns ​

Promise<void>

Implementation of ​

PrefsBackend.remove


set() ​

set(fullKey, value): Promise<void>

Write one entry atomically (full key → envelope string).

Parameters ​

fullKey ​

string

value ​

string

Returns ​

Promise<void>

Implementation of ​

PrefsBackend.set

Built with Modoki.