codemelted.js Module
    Preparing search index...

    Function storage_get

    • Gets the value associated with the key from the module's local storage.

      Parameters

      • params: { key: string; type?: string }

        The named parameters.

        • key: string

          The key to search.

        • Optionaltype?: string

          The storage to act upon.

      Returns Promise<string | null>

      The value associated with the key if found. A rejected promise represents an API violation.

      // To get an element from storage. Either string or null if not found
      // Defaults to STORAGE_TYPE.Local
      let value = await storage_get({key: "cool"});
      // To specify type
      let value = await storage_get({type: STORAGE_TYPE.Session, key: "cool"});