Storage Class
A local disk-based cache for key value pairs for NativeApps.
@note This should be used only for local caching, since its not guaranteed to exist permanently.
Methods
Name | Description | |
---|---|---|
constructor(id: string): Storage | ||
getData(key: string): Promise<StorageValue> | Get the value for a key | |
getKeys(): Promise<string[]> | Return an array of all keys in this Storage. | |
getValueType(key: string): Promise<undefined | "string" | "number" | "boolean" | "Uint8Array" | "null"> | get the type of a value for a key, or undefined if not present. | |
removeAll(): Promise<void> | Remove all keys and their data. | |
removeData(key: string): Promise<void> | Remove a key and its data. | |
setData(key: string, value: StorageValue): Promise<void> | Set value for a key |
Properties
Name | Type | Description | |
---|---|---|---|
id Readonly | string |
Defined in
- core/frontend/src/NativeApp.ts Line 247
Last Updated: 17 December, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.