Skip to content

@ryanuo/utils / finance / formatCurrency

Function: formatCurrency() ​

ts
function formatCurrency(
   amount, 
   currency?, 
   locale?): string;

amount formatter

Parameters ​

amount ​

number

currency? ​

string = 'CNY'

locale? ​

string = 'zh-CN'

Returns ​

string

formatted amount