API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
interfaceKeyValueStore
Async key/value store for application data - game saves, settings, profiles, cached payloads. A single, uniform surface so calling code does not care whether the backing store is synchronous or asynchronous. The backend is the axis you choose by capability, not a flag: - WebStorageStore - `localStorage`/`sessionStorage`: small, synchronous, JSON-only (no Blobs/ArrayBuffers). The moral successor of the old `JsonStore`. - IndexedDbKeyValueStore - IndexedDB: large, structured-clone, so Blobs, `ArrayBuffer`s and nested objects round-trip without JSON. - MemoryStore - in-memory: ephemeral, holds references directly. For tests and throwaway data. Pair with Scene.serialize / Scene.deserialize for a save system: `store.set(slot, scene.serialize())` to save, `scene.deserialize(await store.get(slot))` to restore. Slot naming, profiles and autosave policy are the game's concern, not the engine's.
import { KeyValueStore } from '@codexo/exojs'Async key/value store for application data - game saves, settings, profiles, cached payloads. A single, uniform surface so calling code does not care whether the backing store is synchronous or asynchronous.
The backend is the axis you choose by capability, not a flag: - WebStorageStore - `localStorage`/`sessionStorage`: small, synchronous, JSON-only (no Blobs/ArrayBuffers). The moral successor of the old `JsonStore`. - IndexedDbKeyValueStore - IndexedDB: large, structured-clone, so Blobs, `ArrayBuffer`s and nested objects round-trip without JSON. - MemoryStore - in-memory: ephemeral, holds references directly. For tests and throwaway data.
Pair with Scene.serialize / Scene.deserialize for a save system: `store.set(slot, scene.serialize())` to save, `scene.deserialize(await store.get(slot))` to restore. Slot naming, profiles and autosave policy are the game's concern, not the engine's.
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>