IdbStorage
Defined in: storage.ts:75
IdbStorage is an interface for simple storage of string key-value pairs built on IdbKeyVal
It replaces LocalStorage
implements AuthClientStorage
Implements
Section titled “Implements”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new IdbStorage(
options?
):IdbStorage
Defined in: storage.ts:88
Parameters
Section titled “Parameters”options?
Section titled “options?”DBCreateOptions
Returns
Section titled “Returns”IdbStorage
Example
Section titled “Example”const storage = new IdbStorage({ dbName: 'my-db', storeName: 'my-store', version: 2 });
Accessors
Section titled “Accessors”Get Signature
Section titled “Get Signature”get _db():
Promise
<IdbKeyVal
>
Defined in: storage.ts:94
Returns
Section titled “Returns”Promise
<IdbKeyVal
>
Methods
Section titled “Methods”get<
T
>(key
):Promise
<null
|T
>
Defined in: storage.ts:107
Type Parameters
Section titled “Type Parameters”T
= string
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise
<null
| T
>
Implementation of
Section titled “Implementation of”remove()
Section titled “remove()”remove(
key
):Promise
<void
>
Defined in: storage.ts:118
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise
<void
>
Implementation of
Section titled “Implementation of”set<
T
>(key
,value
):Promise
<void
>
Defined in: storage.ts:113
Type Parameters
Section titled “Type Parameters”T
= string
Parameters
Section titled “Parameters”string
T
Returns
Section titled “Returns”Promise
<void
>