This is an alternative site for discovering Elm packages. You may be looking for the official Elm package site instead.
1.0.0 1.0.1
Medium-esque reading stats in elm
version 2.0.0
license BSD3
native-modules False
elm-version 0.17.1 <= v < 0.18.0
Tag 2.0.0
Committed At 2016-10-25 00:40:59 UTC
elm-lang/html 1.1.0 <= v < 2.0.0 1.1.0
elm-lang/core 4.0.5 <= v < 5.0.0 4.0.5

Modules

README

Reading time

Medium-esque reading stats in elm.

elm package install chrisbuttery/reading-time

If article stats are your thing, you may also like elm-scroll-progress.

Usage

import ReadingTime

str = "I can't believe I ate the whole thing."

ReadingTime.stats str Nothing

{-|
 - { text = "1 min read", minutes = 0.04, time = 2400, words = 8 }
 -}

API

stats : String -> Maybe Float

Passing in a string to count and an option float to calculate word per minute.

Example

Checkout the demos.

Building example

Install Create Elm App and run elm-app build or elm-app start inside of /example.

Tests

% npm install -g elm-test
% elm-test