UNPKG

num-beauty

Version:

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

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