@indlekofer/format_float
v1.0.1
Published
string format float
Downloads
2
Readme
@indlekofer/format_float
Usage
import formatFloat from '@indlekofer/format_float';
console.log(formatFloat("23.456.78", 2, ",", "."); // => 23456.78
Params
formatFloat(float|string number, int decimals = 2, string decPoint = ",", string thousandsSep = ".", round = true)
number: string input number
decimals: number decimals amount
decPoint: string decimal point
thousandsSep: string thousands separator
round: bool do round ?(default: true)
Return
float value of given number or null