Skip to content

Honeystone/reading-time

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Honeystone Reading Time

Static Badge GitHub License Latest Version on Packagist Packagist Dependency Version Static Badge

Use this very simple reading time package to calculate the expected reading time for any given body of text.

Support us

Support Us

We are committed to delivering high-quality open source packages maintained by the team at Honeystone. If you would like to support our efforts, simply use our packages, recommend them and contribute.

If you need any help with your project, or require any custom development, please get in touch.

Installation

composer require honeystone/reading-time

Usage

//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

A list of changes can be found in the CHANGELOG.md file.

License

MIT © Honeystone Consulting Ltd

About

A very simple reading time calculator for PHP.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages