num-beauty
Version:
An ultra lightweight module for formatting numbers into human-friendly strings
10 lines (9 loc) • 341 B
TypeScript
import { type SupportedLocale } from '../locales/index.js';
export interface CurrencyOptions {
currency: string;
decimals?: number;
showSymbol?: boolean;
showCode?: boolean;
stripZeros?: boolean;
}
export declare function formatCurrency(value: number | bigint, locale: SupportedLocale, options: CurrencyOptions): string;