Methods

(inner) formatNumericValue(params) → {string}

The formatNumericValue method will attempt to format params.newValue or params.value as localeString by passing the formatterParams to the localeString() method.

0 must be 0.

NULL is a number and must be parsed as float to be not a number [!isNaN].

The prefix and suffix are concatenated with the localString as params.stringValue.

Unless the formatterParams are NULL the mapp.language property will be assigned as locale for the localeString.

The maximumFractionDigits will be set to 0 for integer type params.

The maximumFractionDigits can be configured as params.round property.

Parameters:
NameTypeDescription
paramsObject

The config object argument.

Properties
NameTypeAttributesDescription
params.suffixString

Suffix appended to stringValue.

params.prefixString

Prefix prepended to stringValue.

params.formatterParamsObject

Configuration for the localeString creation.

params.typeString<optional>

"integer" type params must be formatted with maximumFractionDigits=0.

params.roundInteger<optional>

The round value will be assigned as maximumFractionDigits for the localeString options argument.

Returns:

The concatenated stringValue.

Type: 
string

(inner) unformatStringValue(params) → {number|null}

This function removes the specified prefix and suffix from the input string, then unformats the remaining value based on the provided locale settings. It handles locale-specific decimal separators and removes non-numeric characters. The resulting numeric value is returned as a parsed float.

Parameters:
NameTypeDescription
paramsObject

The configuration object.

Properties
NameTypeAttributesDescription
stringValuestring

The input string to be unformatted.

prefixstring<optional>

Prefix to be removed from stringValue.

suffixstring<optional>

Suffix to be removed from stringValue.

formatterParamsObject<optional>

Configuration for locale-specific formatting.

Properties
NameTypeAttributesDescription
localestring<optional>

The locale to use for unformatting (e.g., 'en-US', 'de-DE').

Returns:

The numeric value extracted from the stringValue, or null if the input is empty or invalid.

Type: 
number | null