Skip to content

IdbKeyVal

Defined in: src/client/db.ts:59

Simple Key Value store Defaults to 'auth-client-db' with an object store of 'ic-keyval'

get<T>(key): Promise<T | null>

Defined in: src/client/db.ts:146

Basic getter Pass in a type T for type safety if you know the type the value will have if it is found

T

IDBValidKey

string | number | Date | BufferSource | IDBValidKey[]

Promise<T | null>

Promise<T | null>

await get<string>('exampleKey') -> 'exampleValue'

remove(key): Promise<void>

Defined in: src/client/db.ts:155

Remove a key

IDBValidKey

IDBValidKey

Promise<void>

void


set<T>(key, value): Promise<IDBValidKey>

Defined in: src/client/db.ts:135

Basic setter

T

IDBValidKey

string | number | Date | BufferSource | IDBValidKey[]

T

value to set

Promise<IDBValidKey>

void


static create(options?): Promise<IdbKeyVal>

Defined in: src/client/db.ts:68

DBCreateOptions

DBCreateOptions

Promise<IdbKeyVal>