WebStorageStore
Defined in: src/storage.ts:10
A synchronous key-value store backed by Storage.
Implements
Section titled “Implements”StoreSyncMapStore
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new WebStorageStore(
storage):WebStorageStore
Defined in: src/storage.ts:15
Parameters
Section titled “Parameters”storage
Section titled “storage”Storage
Returns
Section titled “Returns”WebStorageStore
Properties
Section titled “Properties”storage
Section titled “storage”
protectedstorage:Storage
Defined in: src/storage.ts:15
Accessors
Section titled “Accessors”Get Signature
Section titled “Get Signature”get name():
string
Defined in: src/storage.ts:11
What the file system using this store should be called. For example, tmpfs for an in memory store
Returns
Section titled “Returns”string
Implementation of
Section titled “Implementation of”Store.name
Methods
Section titled “Methods”clear()
Section titled “clear()”clear():
void
Defined in: src/storage.ts:18
Returns
Section titled “Returns”void
clearSync()
Section titled “clearSync()”clearSync():
void
Defined in: src/storage.ts:22
Returns
Section titled “Returns”void
delete()
Section titled “delete()”delete(
key):void
Defined in: src/storage.ts:53
Parameters
Section titled “Parameters”number
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”SyncMapStore.delete
get(
key):Uint8Array<ArrayBufferLike> |undefined
Defined in: src/storage.ts:36
Parameters
Section titled “Parameters”number
Returns
Section titled “Returns”Uint8Array<ArrayBufferLike> | undefined
Implementation of
Section titled “Implementation of”SyncMapStore.get
keys()
Section titled “keys()”keys():
Iterable<number>
Defined in: src/storage.ts:32
Returns
Section titled “Returns”Iterable<number>
Implementation of
Section titled “Implementation of”SyncMapStore.keys
set(
key,data):void
Defined in: src/storage.ts:45
Parameters
Section titled “Parameters”number
Uint8Array
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”SyncMapStore.set
sync()
Section titled “sync()”sync():
Promise<void>
Defined in: src/storage.ts:26
Syncs the store
Returns
Section titled “Returns”Promise<void>
Implementation of
Section titled “Implementation of”Store.sync
transaction()
Section titled “transaction()”transaction():
SyncMapTransaction
Defined in: src/storage.ts:28
Begins a new transaction.
Returns
Section titled “Returns”SyncMapTransaction
Implementation of
Section titled “Implementation of”Store.transaction