Sets a key/value pair within the module's local storage.
codemelted.storage_set
Parameters
params: {key:string;type?:string;value:string}
The named parameters
key: string
The key to store.
Optionaltype?: string
The storage to act
upon.
value: string
The storage entry.
Returns Promise<void>
Rejected promise represents an API violation.
Example
// To add an element to storage. // Defaults to STORAGE_TYPE.Local awaitstorage_set({key:"cool", value:"guy"}); // To specify type awaitstorage_set({type:STORAGE_TYPE.Session, key:"cool", value:"guy"});
Sets a key/value pair within the module's local storage. codemelted.storage_set