Skip to content

@swapped/connect-sdk / format / FormatCurrencyAmountOptions

Type Alias: FormatCurrencyAmountOptions

FormatCurrencyAmountOptions = object

Defined in: src/format/formatCurrencyAmount.ts:3

Properties

firstNonZeroDecimal?

optional firstNonZeroDecimal?: boolean

Defined in: src/format/formatCurrencyAmount.ts:10

Expand decimals past 2 until the first non-zero digit is visible (e.g. 0.0001 instead of 0.00).


format?

optional format?: "js-number" | "pretty"

Defined in: src/format/formatCurrencyAmount.ts:16

Output style:

  • 'pretty' (default) — thousand separators
  • 'js-number' — no separators

removeTrailingZeros?

optional removeTrailingZeros?: boolean

Defined in: src/format/formatCurrencyAmount.ts:5

Strip trailing zeros after the decimal (e.g. 1.501.5).