Skip to content

ToFixedLengthOptions

ToFixedLengthOptions = object

Defined in: packages/core/src/number/to-fixed-length.ts:4

optional fixedFractionDigits?: boolean

Defined in: packages/core/src/number/to-fixed-length.ts:15

Whether to always include the maximum number of fraction digits, even if it means adding trailing zeros. Default is false.

If false, the function will try to reduce the number of fraction digits to fit the specified length.


optional maxFractionDigits?: number

Defined in: packages/core/src/number/to-fixed-length.ts:6

Maximum number of fraction digits to include in the output. Default is 0.


optional roundingMethod?: RoundingMethod

Defined in: packages/core/src/number/to-fixed-length.ts:18

Rounding method to use when rounding the number. Default is "round".