IdbKeyVal
Defined in: db.ts:60
Simple Key Value store
Defaults to 'auth-client-db'
with an object store of 'ic-keyval'
Methods
Section titled “Methods”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
Type Parameters
Section titled “Type Parameters”T
Parameters
Section titled “Parameters”IDBValidKey
string | number | Date | BufferSource | IDBValidKey[]
Returns
Section titled “Returns”Promise
<null
| T
>
Promise<T | null>
Example
Section titled “Example”await get<string>('exampleKey') -> 'exampleValue'
remove()
Section titled “remove()”remove(
key
):Promise
<void
>
Defined in: db.ts:111
Remove a key
Parameters
Section titled “Parameters”IDBValidKey
IDBValidKey
Returns
Section titled “Returns”Promise
<void
>
void
set<
T
>(key
,value
):Promise
<IDBValidKey
>
Defined in: db.ts:91
Basic setter
Type Parameters
Section titled “Type Parameters”T
Parameters
Section titled “Parameters”IDBValidKey
string | number | Date | BufferSource | IDBValidKey[]
T
value to set
Returns
Section titled “Returns”Promise
<IDBValidKey
>
void
create()
Section titled “create()”
static
create(options?
):Promise
<IdbKeyVal
>
Defined in: db.ts:69
Parameters
Section titled “Parameters”options?
Section titled “options?”DBCreateOptions
Returns
Section titled “Returns”Promise
<IdbKeyVal
>
Default
Section titled “Default”
Default
Section titled “Default”