Compare commits

..

3 Commits

Author SHA1 Message Date
7063b80bdd Added download blob function
All checks were successful
Build / Build NPM Project (push) Successful in 22s
Build / Tag Version (push) Successful in 5s
2024-07-19 08:33:26 -04:00
f3049160b6 Fixed imports
All checks were successful
Build / Build NPM Project (push) Successful in 21s
Build / Tag Version (push) Successful in 4s
2024-07-19 00:26:30 -04:00
e21273ddb2 Fixed exports
All checks were successful
Build / Build NPM Project (push) Successful in 21s
Build / Tag Version (push) Successful in 4s
2024-07-19 00:22:00 -04:00
5 changed files with 11 additions and 5 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@ztimson/utils",
"version": "0.13.0",
"version": "0.13.3",
"description": "Utility library",
"author": "Zak Timson",
"license": "MIT",

View File

@ -6,3 +6,9 @@ export function download(href: any, name: string) {
a.click();
document.body.removeChild(a);
}
export function downloadBlob(blob: Blob, name: string) {
const url = URL.createObjectURL(blob);
download(url, name);
URL.revokeObjectURL(url);
}

View File

@ -1,5 +1,5 @@
import {clean} from './objects';
import {PromiseProgress} from './promise-progress.ts';
import {PromiseProgress} from './promise-progress';
export type DecodedResponse<T> = Response & {data?: T}

View File

@ -3,7 +3,7 @@ export * from './aset';
export * from './download';
export * from './emitter';
export * from './errors';
export * from './http.ts';
export * from './http';
export * from './logger';
export * from './math';
export * from './misc';
@ -11,4 +11,4 @@ export * from './objects';
export * from './promise-progress';
export * from './string';
export * from './time';
export * from './upload.ts';
export * from './upload';

View File

@ -1,4 +1,4 @@
import {PromiseProgress} from './promise-progress.ts';
import {PromiseProgress} from './promise-progress';
export type UploadOptions = {
url: string;