UNPKG

num-beauty

Version:

An ultra lightweight module for formatting numbers into human-friendly strings

3 lines (2 loc) 192 B
export type RoundingMode = 'UP' | 'DOWN' | 'CEIL' | 'FLOOR' | 'HALF_UP' | 'HALF_DOWN' | 'HALF_EVEN'; export declare function round(num: number, decimals: number, mode?: RoundingMode): number;