Skip to main content

Interface: INumberFormatter

Broker.INumberFormatter

Specific formatter for number

Hierarchy​

Methods​

format​

format(value?, options?): string

Formatter for a number

Parameters​

NameType
value?number
options?NumberFormatterFormatOptions

Returns​

string

Overrides​

IFormatter.format


formatChange​

Optional

formatChange(currentPrice, prevPrice, options?): string

Formatter for a price change

Parameters​

NameTypeDescription
currentPricenumbercurrent price
prevPricenumberprevious price
options?NumberFormatterFormatOptionsformat options

Returns​

string


parse​

Optional

parse(value, options?): ErrorFormatterParseResult | SuccessFormatterParseResult<number>

Check if the input value satisfies the logic and return either an error or the result of the parsing

Parameters​

NameType
valuestring
options?FormatterParseOptions

Returns​

ErrorFormatterParseResult | SuccessFormatterParseResult<number>

Inherited from​

IFormatter.parse