Function
The named parameters
The key to store.
Optionaltype?: stringThe storage to act upon.
The storage entry.
Rejected promise represents an API violation.
// Make sure it is available to the runtime.
if (runtime_available({request: AVAILABILITY_REQUEST.Local})) {
// To add an element to storage.
// Defaults to STORAGE_TYPE.Local
await storage_set({key: "cool", value: "guy"});
// To specify type
await storage_set({type: STORAGE_TYPE.Session, key: "cool", value: "guy"});
}
Sets a key/value pair within the module's local storage. codemelted.storage_set