https://github.com/rohitedathil/humanize_big_int
A simple dart package to convert large numbers to a human readable format. 1278 to 1.2K instead, for example.
https://github.com/rohitedathil/humanize_big_int
dart flutter hacktoberfest humanize numbers
Last synced: about 1 year ago
JSON representation
A simple dart package to convert large numbers to a human readable format. 1278 to 1.2K instead, for example.
- Host: GitHub
- URL: https://github.com/rohitedathil/humanize_big_int
- Owner: RohitEdathil
- License: mit
- Created: 2021-11-23T11:44:24.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-03-06T17:12:08.000Z (about 4 years ago)
- Last Synced: 2025-03-18T11:14:52.719Z (about 1 year ago)
- Topics: dart, flutter, hacktoberfest, humanize, numbers
- Language: Dart
- Homepage:
- Size: 10.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
A simple dart package to convert large numbers to a human readable format. 1278 to 1.2K instead, for example.
### [See in pub.dev](https://pub.dev/packages/humanize_big_int)
## Features
Represents large numbers in terms of K, M, B, T etc. (1234 -> 1.2K)
### humanizeInt
| Integer | Humanized |
| --------- | --------- |
| 1278 | 1.2K |
| 250 | 250 |
| 12340000 | 12M |
| 123400000 | 120M |
### humanizeIntInd
Represents large numbers in terms of K, L, Cr (Indian Numbering System) etc. (1234 -> 1.2K)
| Integer | Humanized |
| --------- | --------- |
| 1278 | 1.2K |
| 250 | 250 |
| 123400 | 1.2L |
| 123400000 | 12Cr |
## Usage
### humanizeInt
```dart
final n1 = humanizeInt(1234); // 1.2K
final n2 = humanizeInt(12340000); // 12M
```
### humanizeIntInd
```dart
final n1 = humanizeIntInd(1234); // 1.2K
final n2 = humanizeIntInd(12340000); // 1.2Cr
```
## Additional information
This package only offers this niche functionality. For more general use cases, checkout
- [humanize](https://pub.dev/packages/humanize)
- [humanizer](https://pub.dev/packages/humanizer)