reablocks
Version:
Component library for React
12 lines (11 loc) • 459 B
TypeScript
export type FormatSizeTypes = number | string | null | undefined;
/**
* Given a size, format it to a human readable string.
*
* @param size the size to format
* @param emptyValue what to show when empty
* @param scale the scale to format on
* @param decimals number of decimal places
* @returns formatted string
*/
export declare function formatSize(size: FormatSizeTypes, emptyValue?: string, scale?: string[], decimals?: number): string | string[];