createMemoryStorage
function createMemoryStorage(options?): MemoryKvStorage;Defined in: src/storage/memory.ts:49
Create an in-memory MemoryKvStorage. watch callbacks fire on the next microtask after a
write or remove; compareAndSwap compares structurally (own properties, key order ignored) and
is race-free in-process.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
options? |
MemoryStorageOptions |
Returns
Section titled “Returns”Example
Section titled “Example”import { createMemoryStorage } from "@xtandard/kit/storage/memory";
const storage = createMemoryStorage({ initial: { "app/config": { theme: "dark" } } });