Skip to content

Function: formatNumberCustom()

ts
function formatNumberCustom(value, options?): string;

Custom separators number formatting. 自定义分隔符数字格式化。

Parameters

ParameterType
valuenumber
optionsFormatNumberCustomOptions

Returns

string

Example

ts
formatNumberCustom(1234567.89, { thousands: '.', decimal: ',', precision: 2 }) // => '1.234.567,89'

Since

1.0.0

Released under the MIT License.