Gets the value associated with the key from the module's local storage.
Parameters
params: {key:string;type?:string}
The named parameters.
key: string
The key to search.
Optionaltype?: string
The storage to act
upon.
Returns Promise<string|null>
The value associated with the key if found. A
rejected promise represents an API violation.
Example
// To get an element from storage. Either string or null if not found // Defaults to STORAGE_TYPE.Local letvalue = awaitstorage_get({key:"cool"}); // To specify type letvalue = awaitstorage_get({type:STORAGE_TYPE.Session, key:"cool"});
Gets the value associated with the key from the module's local storage.