Skip to content

Latest commit

 

History

History
40 lines (29 loc) · 935 Bytes

README.md

File metadata and controls

40 lines (29 loc) · 935 Bytes

ReadingTime

Hex pm Build Status


Medium's like reading time estimation for Elixir. ReadingTime helps you estimate how long a text will take to be read.

This is based on reading-time for JavaScript.

Installation

This package can be installed by adding reading_time to your list of dependencies in mix.exs:

def deps do
  [
    {:reading_time, "~> 0.1.0"}
  ]
end

Usage

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

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

The docs can be found at https://hexdocs.pm/reading_time.