API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
classWebStorageStore
KeyValueStore over the Web Storage API (`localStorage` or `sessionStorage`). Web Storage holds only strings, so values are JSON-serialized on write and parsed on read - they must be JSON-serializable (**no** Blobs/`ArrayBuffer`s; use IndexedDbKeyValueStore for those). The backend is synchronous with a small (~5-10 MB) quota; the async interface wraps it so call sites stay uniform across stores. This is the moral successor of the former `JsonStore`: JSON is intrinsic here because the backend can only hold strings.
import { WebStorageStore } from '@codexo/exojs'KeyValueStore over the Web Storage API (`localStorage` or `sessionStorage`).
Web Storage holds only strings, so values are JSON-serialized on write and parsed on read - they must be JSON-serializable (**no** Blobs/`ArrayBuffer`s; use IndexedDbKeyValueStore for those). The backend is synchronous with a small (~5-10 MB) quota; the async interface wraps it so call sites stay uniform across stores. This is the moral successor of the former `JsonStore`: JSON is intrinsic here because the backend can only hold strings.
new(storage: Storage, options: WebStorageStoreOptionsConstruction options for WebStorageStore.): WebStorageStoreclear(): Promise<boolean>delete(key: string): Promise<boolean>get(key: string): Promise<T | null>has(key: string): Promise<boolean>set(key: string, value: unknown): Promise<void>