1.11.0 • Published 1 month ago

reading-time-estimator v1.11.0

Weekly downloads
122
License
MIT
Repository
github
Last release
1 month ago

reading-time-estimator

Test Lint Semantic Release Commitizen friendly semantic-release npm npm npm bundle size (minified)

All Contributors

forthebadge forthebadge forthebadge

A medium's like reading time estimator with internationalization support.

Documentation

Reading Time Estimator was created to provide an estimate of how long to read an article or blog as seen on medium.

Installation

With NPM

  npm install reading-time-estimator

or Yarn

  yarn add reading-time-estimator

API

The api is fairly simple. Here are the types definition for this module.

It is a simple function that takes the data as a required argument with the words per minute and locale as optional arguments.

Per default the locale is set to english en.

Per default the word per minute is set to 300.

At the moment there is only 12 supported locales: en, fr, es, pt-br, cn, ja, de, tr, ro, bn, sk and cs.

Usage

Try it live here

import { readingTime } from 'reading-time-estimator'

const text = 'some text to parse'

// default options
const result = readingTime(text, 10)

// output:
// {
//   minutes: 4,
//   words: 43,
//   text: `4 min read`
// }

// with french locale
const result = readingTime(text, 10, 'fr')

// output:
// {
//   minutes: 4,
//   words: 43,
//   text: `4 min de lecture`
// }

Why Not ...?

reading-time

This package does not offer internationalization support which was a must for me.

Contributors ✨

Thanks goes to these wonderful people (emoji key):

This project follows the all-contributors specification. Contributions of any kind welcome!

1.11.0

1 month ago

1.10.0

2 months ago

1.9.4

4 months ago

1.9.3

4 months ago

1.9.2

5 months ago

1.9.1

5 months ago

1.9.0

10 months ago

1.8.1

1 year ago

1.8.0

1 year ago

1.6.2

2 years ago

1.6.1

2 years ago

1.6.0

2 years ago

1.7.2

2 years ago

1.7.1

2 years ago

1.7.0

2 years ago

1.5.3

2 years ago

1.5.2

2 years ago

1.5.1

2 years ago

1.4.6

2 years ago

1.4.5

2 years ago

1.4.4

2 years ago

1.4.3

2 years ago

1.4.2

2 years ago

1.4.20

2 years ago

1.4.22

2 years ago

1.4.21

2 years ago

1.4.24

2 years ago

1.4.23

2 years ago

1.4.26

2 years ago

1.4.25

2 years ago

1.4.28

2 years ago

1.4.27

2 years ago

1.4.29

2 years ago

1.4.31

2 years ago

1.4.30

2 years ago

1.4.33

2 years ago

1.4.32

2 years ago

1.4.35

2 years ago

1.4.34

2 years ago

1.4.37

2 years ago

1.4.36

2 years ago

1.4.39

2 years ago

1.4.38

2 years ago

1.5.0

2 years ago

1.4.40

2 years ago

1.4.42

2 years ago

1.4.41

2 years ago

1.4.44

2 years ago

1.4.43

2 years ago

1.4.46

2 years ago

1.4.45

2 years ago

1.4.48

2 years ago

1.4.47

2 years ago

1.4.49

2 years ago

1.4.51

2 years ago

1.4.50

2 years ago

1.4.53

2 years ago

1.4.52

2 years ago

1.4.9

2 years ago

1.4.55

2 years ago

1.4.11

2 years ago

1.4.8

2 years ago

1.4.54

2 years ago

1.4.10

2 years ago

1.4.7

2 years ago

1.4.13

2 years ago

1.4.12

2 years ago

1.4.15

2 years ago

1.4.14

2 years ago

1.4.17

2 years ago

1.4.16

2 years ago

1.4.19

2 years ago

1.4.18

2 years ago

1.4.0

2 years ago

1.3.4

3 years ago

1.3.3

3 years ago

1.3.2

3 years ago

1.3.1

3 years ago

1.3.0

4 years ago

1.2.0

5 years ago

1.1.0

5 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.2

6 years ago