@naturalcycles/js-lib
Version:
Standard library for universal (browser + Node.js) javascript
16 lines (15 loc) • 563 B
TypeScript
export declare function _gb(b: number): number;
export declare function _mb(b: number): number;
export declare function _kb(b: number): number;
/**
* Byte size to Human byte size string
*/
export declare function _hb(b?: number): string;
/**
* hc stands for "human count", similar to "human bytes" `_hb` function.
* Helpful to print big numbers, as it adds `K` (kilo), `M` (mega), etc to make
* them more readable.
*
* Implementation rule of thumb: aim to have up to 3 significant digits, cut the rest.
*/
export declare function _hc(c?: number): string;