Dilawar Singh Being Dilawar/ Tools/

Here is the function.

saveBlob : function(blob, filename) {
      var url = window.URL.createObjectURL(blob);
      var a = document.createElement("a");
      a.target = "_blank";
      a.href = url;
      a.download = filename;
      a.onclick = function(e) {
        setTimeout( () => {
          window.URL.revokeObjectURL(url);
        }, 100);
      };
      a.click();
      a.remove();
},