Docs Menu
API Developer Guide / middleware / pub / util / format / formatPercentage

Service: formatPercentage

This service is responsible for formatting a numerical value as a percentage, including options for specifying the number of decimal places.

Input Parameter:

Name Type Description
number: Number The numerical value to be formatted as a percentage.
decimalPlaces: Integer The number of decimal places to include in the formatted percentage value.

Output Parameter:

Name Type Description
result: String The formatted percentage value as a string.