API reference

Every public class, method, and event in @codexo/exojs. Generated from source.

C

classWebStorageStore

@codexo/exojs / resources / stable

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.

0
props
5
methods
0
events
Import
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.

Constructors 1
new(storage: Storage, options: WebStorageStoreOptions): WebStorageStore
Methods 5
clear(): 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>
Source