Appearance
@swapped/connect-sdk / format / formatCurrency
Function: formatCurrency()
formatCurrency(
params):string
Defined in: src/format/formatCurrency.ts:27
Formats a value as a fixed-decimal currency-style number.
Accepts a JS number or a plain decimal / scientific string (23, 1e-7). Grouped strings, NaN, and Infinity return ''.
Parameters
params
Formatting options
Returns
string
Fixed-decimal formatted string, or '' when number is not a plain amount