Optionaltype: string = STORAGE_TYPE.Local
The storage to act upon.
The number in storage. A rejected promise represents an API violation.
// Make sure it is available to the runtime.
if (runtime_available({request: AVAILABILITY_REQUEST.Local})) {
// To get the number of elements in storage
// Assumes no errors with the CResult.
// Defaults to STORAGE_TYPE.Local
let length = await storage_length());
// To specify type
let length = await storage_length(type: STORAGE_TYPE.Session));
}
Retrieves the number of entries within the module's local storage.