Formats a number or string value according to the specified number type.
This utility function handles both numeric and string inputs by converting
string values to numbers before applying the appropriate formatting rules.
It provides a convenient way to format values that might come from different
data sources in different types.
Formats a number or string value according to the specified number type.
This utility function handles both numeric and string inputs by converting string values to numbers before applying the appropriate formatting rules. It provides a convenient way to format values that might come from different data sources in different types.