Skip to content

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.

Parameter Type
options? MemoryStorageOptions

MemoryKvStorage

import { createMemoryStorage } from "@xtandard/kit/storage/memory";
const storage = createMemoryStorage({ initial: { "app/config": { theme: "dark" } } });