honeystone / reading-time
一个用于PHP的非常简单的阅读时间计算器。
1.1.0
2024-07-29 01:05 UTC
Requires
- php: ^8.0
- nesbot/carbon: ^2.72|^3.7
Requires (Dev)
- pestphp/pest: ^2.34
- phpstan/phpstan: ^1.11
- phpunit/phpunit: ^10.0
This package is auto-updated.
Last update: 2024-09-27 17:13:59 UTC
README
使用这个非常简单的阅读时间包来计算任何给定文本的预期阅读时间。
支持我们
我们致力于提供由Honeystone团队维护的高质量开源软件包。如果您想支持我们的努力,只需使用我们的软件包,推荐它们并做出贡献。
如果您在项目中需要任何帮助,或需要任何定制开发,请联系我们。
安装
composer require honeystone/reading-time
用法
//average reading time reading_time($text); //5m //fast reading time reading_time()->fast($text) //4m //slow reading time reading_time()->slow($text) //6m //include seconds reading_time(config: ['seconds' => true]); //5m 10s //longform reading_time(config: ['short' => false]); //5 minutes //configure globally reading_time()->configure(['short' -> false], true); //all available config & defaults reading_time()->configure([ 'slowWpm' => 180, 'averageWpm' => 240, 'fastWpm' => 320, 'additionalCharacters' => '', 'seconds' => false, 'format' => null, 'short' => true, 'countHtml' => false, ]);
变更日志
可以在CHANGELOG.md文件中找到变更列表。