We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3c01883 commit ac54eabCopy full SHA for ac54eab
1 file changed
downloadFile.js
@@ -1,6 +1,6 @@
1
import { CONTENT_TYPE } from "https://code4sabae.github.io/js/CONTENT_TYPE.js";
2
3
-const downloadFile = (name, uint8arry) => {
+export const downloadFile = (name, uint8arry) => {
4
const ext = name.split('.').pop().toLowerCase();
5
const mime = CONTENT_TYPE[ext] || "application/octet-stream";
6
const blob = new Blob([uint8arry], { type: mime });
@@ -13,5 +13,3 @@ const downloadFile = (name, uint8arry) => {
13
link.remove();
14
URL.revokeObjectURL(url);
15
};
16
-
17
-export { downloadFile };
0 commit comments