Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
7063b80bdd | |||
f3049160b6 | |||
e21273ddb2 |
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ztimson/utils",
|
||||
"version": "0.13.0",
|
||||
"version": "0.13.3",
|
||||
"description": "Utility library",
|
||||
"author": "Zak Timson",
|
||||
"license": "MIT",
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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}
|
||||
|
||||
|
@ -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';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {PromiseProgress} from './promise-progress.ts';
|
||||
import {PromiseProgress} from './promise-progress';
|
||||
|
||||
export type UploadOptions = {
|
||||
url: string;
|
||||
|
Reference in New Issue
Block a user