npm.io
1.0.0 • Published 3 years ago

@master_teacher/formatamount

Licence
ISC
Version
1.0.0
Deps
0
Size
3 kB
Vulns
0
Weekly
0

formatAmount

This is a function that accepts a string of digits and return the formatted amount.

Usage

npm i @master_teacher/formatamount

    const formatter = require("@master_teacher/formatamount")

    const amount = '355763673554.94';
    const result = formatter(amount);
    console.log(result) //355,763,673,554.94

Keywords