codemelted.js Module
    Preparing search index...

    Function storage_length

    • Retrieves the number of entries within the module's local storage.

      Parameters

      • Optionaltype: string = STORAGE_TYPE.Local

        The storage to act upon.

      Returns Promise<number>

      The number in storage. A rejected promise represents an API violation.

      // 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));