Skip to main content
Version: Next

roundDecimalFormat()

function roundDecimalFormat(
value,
decimals,
options): string

Rounds number to a fixed number of decimals, then formats as a human readable string

Parameters

ParameterTypeDefault valueDescription
valuenumberundefinedValue to round
decimalsnumber1Number of digits after the decimal point to keep
optionsRoundDecimalOptions{}-

Returns

string

rounded number as a human readable string