codemelted.js Module
    Preparing search index...

    Function storage_key

    • Retrieves the key at the specified index.

      Parameters

      • params: { index: number; type?: string }

        The named parameters

        • index: number

          The key entry to look up.

        • Optionaltype?: string

          The storage to act upon.

      Returns Promise<string | null>

      The key at the specified index or null if beyond the storage capacity. A rejected promise represents an API violation.

      // To get a key at an index. Either string or null if not found
      // Defaults to STORAGE_TYPE.Local
      let key = await storage_key({index: 0});
      // To specify type
      let key = await storage_key({type: STORAGE_TYPE.Session, index: 0});