API reference

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

C

classIndexedDbKeyValueStore

@codexo/exojs / assets / stable

KeyValueStore over IndexedDB, using the **structured-clone** algorithm. Unlike WebStorageStore, values are stored *directly* - no `JSON.stringify`. So `Blob`s, `ArrayBuffer`s, typed arrays and nested objects round-trip natively, and there is no string-size ceiling beyond the (large) IndexedDB quota. Use this for binary or large saves; use `WebStorageStore` for small synchronous JSON.

0
props
6
methods
0
events
Import
import { IndexedDbKeyValueStore } from '@codexo/exojs'

KeyValueStore over IndexedDB, using the **structured-clone** algorithm.

Unlike WebStorageStore, values are stored *directly* - no `JSON.stringify`. So `Blob`s, `ArrayBuffer`s, typed arrays and nested objects round-trip natively, and there is no string-size ceiling beyond the (large) IndexedDB quota. Use this for binary or large saves; use `WebStorageStore` for small synchronous JSON.

Constructors1
new(nameOrOptions: IndexedDbKeyValueStoreOptionsConstruction options for IndexedDbKeyValueStore. | string): IndexedDbKeyValueStore
Methods6
clear(): Promise<boolean>
Remove every entry owned by this store. Resolves true on success.
delete(key: string): Promise<boolean>
Remove the entry at key. Resolves true if one existed and was removed.
destroy(): void
Synchronously release the underlying database handle.
get(key: string): Promise<T | null>
Read the value at key, or null when absent.
has(key: string): Promise<boolean>
Whether an entry exists at key.
set(key: string, value: unknown): Promise<void>
Write value at key, replacing any existing entry.
Source