https://github.com/ollieglass/js-humanize
Humanize large numbers
https://github.com/ollieglass/js-humanize
Last synced: about 2 months ago
JSON representation
Humanize large numbers
- Host: GitHub
- URL: https://github.com/ollieglass/js-humanize
- Owner: ollieglass
- Created: 2013-04-25T10:39:57.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2013-06-12T19:19:11.000Z (over 12 years ago)
- Last Synced: 2024-07-02T16:43:28.784Z (over 1 year ago)
- Language: JavaScript
- Size: 119 KB
- Stars: 14
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-web-dev-resources - js-humanize
README
#js-humanize#
JavaScript number formatter for human readability
## Usage ##
```javascript
Humanize.humanize(1); // 1
Humanize.humanize(10); // 10
Humanize.humanize(100); // 100
Humanize.humanize(1000); // '1K'
Humanize.humanize(10000); // '10K'
Humanize.humanize(100000); // '100K'
Humanize.humanize(1000000); // '1M'
Humanize.humanize(10000000); // '10M'
Humanize.humanize(1000000000); // '1B'
Humanize.humanize(10000000000); // '10B'
Humanize.humanize(100000000000); // '100B'
```