serhii / short-number
For changing the language you want to call `set` method once before calling other methods from this package.
Installs: 3 135
Dependents: 0
Suggesters: 0
Security: 0
Stars: 6
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/serhii/short-number
Requires
- php: ^8.1
Requires (Dev)
- laravel/pint: v1.18.3
- phpstan/phpstan: ^2.0.3
- phpunit/phpunit: ^10.5.38
- squizlabs/php_codesniffer: ^3.11.1
- symfony/var-dumper: ^6.4.15
README
Lightweight package shortens given number to a short representation of it. For example 1234 will be formatted to 1k and 20244023 to 20m. Package supports multiple languages and can be easily extended with new languages.
Follow the full documentation for this package
Quick Start
composer require serhii/short-number
Supported Languages
| Flag | Language | Code |
|---|---|---|
| π¬π§ | English | en |
| π·πΊ | Russian | ru |
| πΊπ¦ | Ukrainian | uk |
| π¨π³ | Chinese | zh |
| π―π΅ | Japanese | ja |
License
The Short Number project is licensed under the MIT License
Contribute
With Container Engine
Build an Image
To build an image, navigate to the root of the project and run this command.
With Podman:
podman-compose build app
With Docker:
docker compose build app
Run the Container
To run a container, navigate to the root of the project and run this command.
With Podman:
podman-compose run --rm app
With Docker:
docker compose run --rm app
Cleanup
You can remove networks and cleanup by running this command.
With Podman:
podman-compose down
With Docker:
docker compose down