@indlekofer/format_numeric

1.0.2 • Public • Published

@indlekofer/format_numeric

Usage

import format from '@indlekofer/format_numeric';

console.log(format(23456.78, 4, ",", ".")); //=> "23.456,7800"

Params

format(float|string number, int decimals = 2, string decPoint = ",", string thousandsSep = ".", round = true)

number: number input number
decimals: number decimals amount (default true)
decPoint: string decimal point (default ,)
thousandsSep: number thousands separator (default .)
round: bool do round ?(default: true)

Return

string formatted number

Exports

pad

value: number
length: number (default 2)

Return

string

Readme

Keywords

none

Package Sidebar

Install

npm i @indlekofer/format_numeric

Weekly Downloads

1

Version

1.0.2

License

MIT

Unpacked Size

3.37 kB

Total Files

4

Last publish

Collaborators

  • daind