apphouse
Version:
Component library for React that uses observable state management and theme-able components.
16 lines (15 loc) • 717 B
TypeScript
export declare const downloadBlob: (blob: Blob, name?: string) => void;
export declare const downloadFileFromLink: (url: string, filename?: string) => void;
export declare function saveAs(blob: any, filename: string, opts?: any, popup?: any): Promise<void>;
export declare const download: (url: string, name: string, opts?: any) => void;
/**
* Format bytes as human-readable text.
*
* @param bytes Number of bytes.
* @param si True to use metric (SI) units, aka powers of 1000. False to use
* binary (IEC), aka powers of 1024.
* @param dp Number of decimal places to display.
*
* @return Formatted string.
*/
export declare function humanFileSize(bytes: number, si?: boolean, dp?: number): string;