codemelted.js Module
    Preparing search index...

    Function storage_set

    • Function

      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.

      // To add an element to storage.
      // Defaults to STORAGE_TYPE.Local
      await storage_set({key: "cool", value: "guy"});
      // To specify type
      await storage_set({type: STORAGE_TYPE.Session, key: "cool", value: "guy"});