Optionaldecimals: number | "" | null
default 0
OptionaltrailingZeroes: AnythingFalsy
Whether to return a string keeping the trailing zeroes
Round a number to the given amount of decimals (none by default)
The result is a number, so round(1.1, 2) gives 1.1: pass trailingZeroes
to get the formatted string with the trailing zeroes instead ("1.10").
default 0
Whether to return a string keeping the trailing zeroes
Round a number to the given amount of decimals (none by default)
The result is a number, so round(1.1, 2) gives 1.1: pass trailingZeroes
to get the formatted string with the trailing zeroes instead ("1.10").
Optionaldecimals: number | "" | null
default 0
OptionaltrailingZeroes: boolean | 1 | AnythingFalsy
Whether to return a string keeping the trailing zeroes
Round a number to the given amount of decimals (none by default)
The result is a number, so
round(1.1, 2)gives1.1: passtrailingZeroesto get the formatted string with the trailing zeroes instead ("1.10").