ReadingTime (reading_time v0.2.0) View Source

Documentation for ReadingTime.

Link to this section Summary

Functions

Returns the time in minutes for a given string.

Link to this section Functions

Link to this function

time(string, opts \\ [])

View Source

Specs

time(String.t(),
  words_per_minute: non_neg_integer(),
  split_pattern: [String.t(), ...]
) :: number()

Returns the time in minutes for a given string.

Examples

iex> ReadingTime.time("this is a random text")
1

iex> ReadingTime.time("this_is_a-random-text", words_per_minute: 1, split_pattern: ["_", "-"])
5