You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
1 month ago | |
---|---|---|
docs | 1 month ago | |
src | 1 month ago | |
.gitattributes | 1 month ago | |
.gitignore | 1 month ago | |
LICENSE.md | 1 month ago | |
README.md | 1 month ago | |
composer.json | 1 month ago | |
phpcs.xml | 1 month ago |
README.md
KiloMega
A metric formatter for PHP.
Installation
composer require 'arokettu/kilo-mega'
Documentation
Formatting a metric value
<?php
use function \Arokettu\KiloMega\format_metric;
echo format_metric(1000, suffix: 'W'); // 1.0 kW
Formatting a byte or bit value
<?php
use function \Arokettu\KiloMega\format_bytes;
echo format_bytes(1234); // 1.2 KiB
Support
Please file issues on our main repo at GitLab: https://gitlab.com/sandfox/kilo-mega/-/issues
Feel free to ask any questions in our room on Gitter: https://gitter.im/arokettu/community
License
The library is available as open source under the terms of the MIT License.