Import
What it does
StorageManager provides a unified key-value storage API that works in the browser (localStorage / sessionStorage) and falls back to an in-memory store in Node.js or environments where the Web Storage API is unavailable. Keys are automatically namespaced with a configurable prefix.
In Node.js the in-memory fallback behaves identically to the browser API, so your code can run isomorphically without conditional imports.
Constructor
StorageManagerConfig
Methods
get<T>(key)
key, or null if the key does not exist.
set<T>(key, value)
value under key.
remove(key)
key.
clear()
StorageManager instance (scoped by prefix).
has(key)
true if key exists in storage.