https://github.com/unusualabsurd/num-format
https://github.com/unusualabsurd/num-format
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/unusualabsurd/num-format
- Owner: UnusualAbsurd
- License: apache-2.0
- Created: 2021-09-01T06:16:25.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2021-10-01T07:33:09.000Z (over 4 years ago)
- Last Synced: 2025-08-14T13:17:52.951Z (10 months ago)
- Size: 9.77 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# number-prettier
Pretty a number and shortened it to make it look more pretty and simple.
## Number Commas ðŸŒ
```js
const { commas } = require('number-prettier')
commas(1000000) // 1,000,000
```
## Number Formatting 📲
```js
const { format } = require('number-prettier')
format(1000, 2) // 1k
```
## Available Values
```json
{
"k": "thousands",
"M": "millions",
"B": "billions",
"T": "trillions",
"Q": "quadrillions",
"QT": "quintillions"
}
```
### Note
```
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 😄
```
# https://clickerheroes.fandom.com/wiki/Units