https://github.com/z7pz/smash-numbers
https://github.com/z7pz/smash-numbers
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/z7pz/smash-numbers
- Owner: z7pz
- Created: 2020-09-25T21:19:32.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-09-25T23:11:49.000Z (over 5 years ago)
- Last Synced: 2025-03-18T13:57:23.316Z (about 1 year ago)
- Language: JavaScript
- Size: 3.91 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Installation
`npm i smash-numbers --save`
Then...
```
import { convert, comma } from 'smash-numbers'
convert(1000) // 1K
comma(10000) // 10,000
```
## Options
* *convert* - _CAPITAL | SMALL_ (Defaults to CAPITAL) ` convert(1000, 'SMALL') // 1k `
* *comma* - _(any thing you want)_ (Defaults to ,) ` comma(10000, '.') // 10.000 `