Pretty a number and shortened it to make it look more pretty and simple.
const { commas } = require('number-prettier')
commas(1000000) // 1,000,000
const { format } = require('number-prettier')
format(1000, 2) // 1k
{
"k": "thousands",
"M": "millions",
"B": "billions",
"T": "trillions",
"Q": "quadrillions",
"QT": "quintillions"
}
You can add more values by accessing the index.js file from the package file , and added the values on your own!
Below are the list of the scientifc notations for the values! Thank you 😄