Skip to content

API reference / @localizer/format-number / percentFormatter

Function: percentFormatter()

percentFormatter<T>(options?): ValueFormatter<T>

Defined in: percentFormatter.ts:32

Creates a localized percentage formatter.

Type Parameters

Type ParameterDescription
T extends number | bigintThe value type, either number or bigint.

Parameters

ParameterTypeDescription
options?NumberFormatOptionsOptional formatting options.

Returns

ValueFormatter<T>

A ValueFormatter for percentage strings.