Skip to content

IdbKeyVal

Defined in: db.ts:60

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

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

Defined in: db.ts:102

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<null | T>

Promise<T | null>

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

remove(key): Promise<void>

Defined in: db.ts:111

Remove a key

IDBValidKey

IDBValidKey

Promise<void>

void


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

Defined in: db.ts:91

Basic setter

T

IDBValidKey

string | number | Date | BufferSource | IDBValidKey[]

T

value to set

Promise<IDBValidKey>

void


static create(options?): Promise<IdbKeyVal>

Defined in: db.ts:69

DBCreateOptions

DBCreateOptions

Promise<IdbKeyVal>