amneale/byteform
Composer 安装命令:
composer require amneale/byteform
包简介
PHP library for parsing byte amounts
README 文档
README
PHP library for parsing and formatting byte amounts
Installing
composer require amneale/byteform
Usage
Parsing byte amounts
$parser = new \Amneale\ByteForm\ByteParser(); $parser->parseBytes("1.5KB"); // int(1536)
Formatting byte amounts
$formatter = new \Amneale\ByteForm\ByteFormatter(); $formatter->formatBytes(1536); // "1.50KB" $formatter->formatBytes(1536, 1); // "1.5KB"
Contributing
Running tests
byteform uses phpspec to drive development
make test
Fixing code style
Code style rules are defined in .php_cs.dist. These rules are used to automatically fix any code style discrepancies
make fmt
统计信息
- 总下载量: 27
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2020-03-29