Skip to main content

Function: roundNumber()

roundNumber(input: string | number, decimals: number): number

Rounds a number to a specified amount of decimal places.

Parameters

ParameterTypeDefault valueDescription
inputstring | numberundefinedThe number to round off
decimalsnumber0The amount of decimals to retain

Returns

number

Defined in

roundNumber.ts:7