The named parameters.
The key to search.
Optionaltype?: stringThe storage to act upon.
The value associated with the key if found. A rejected promise represents an API violation.
// Make sure it is available to the runtime.
if (runtime_available({request: AVAILABILITY_REQUEST.Local})) {
// To get an element from storage. Either string or null if not found
// Defaults to STORAGE_TYPE.Local
let value = await storage_get({key: "cool"});
// To specify type
let value = await storage_get({type: STORAGE_TYPE.Session, key: "cool"});
}
Gets the value associated with the key from the module's local storage.