num-beauty
Version:
An ultra lightweight module for formatting numbers into human-friendly strings
28 lines (27 loc) • 759 B
TypeScript
export interface CurrencyConfig {
symbol: string;
position: 'before' | 'after';
}
export interface LocaleConfig {
code: string;
name: string;
masks: Record<string, string>;
currencies: Record<string, CurrencyConfig>;
units: ReadonlyArray<readonly [string, string]>;
}
export type SupportedLocale = 'en-US' | 'pt-BR' | 'es-ES';
export declare const locales: Record<SupportedLocale, {
masks: Record<string, string>;
currencies: Record<string, CurrencyConfig>;
units: ReadonlyArray<readonly [string, string]>;
}>;
export declare const supportedLocales: ({
code: "pt-BR";
name: "Português (Brasil)";
} | {
code: "en-US";
name: "English (US)";
} | {
code: "es-ES";
name: "Español (España)";
})[];