Skip to content

CreateMemoryStorage

katanakit-js / createMemoryStorage

function createMemoryStorage(): Storage;

Defined in: infrastructure/storage/storage.service.ts:75

Creates a new in-memory Storage instance used as an SSR / private-mode fallback. Each call owns its own Map — never share one across requests.

Storage

An object conforming to the Web Storage API.

const mem = createMemoryStorage();
mem.setItem("key", JSON.stringify({ a: 1 }));