blog-reading-time

1.0.1 • Public • Published

blog-reading-time

Version


Blog reading time estimation.

blog-reading-time helps you estimate how long an article will take to read. It works perfectly with plain text, but also with markdown or html.

Note that it's focused on performance and simplicity, so the number of words it will extract from other formats than plain text can vary a little. But this is an estimation right?

Note blog-reading-time it just returns number value!

Installation

npm i blog-reading-time

Usage

React App

import getReadingTime from 'blog-reading-time';

function App() {

    const text = "this is a sample text";

    return (
        <div>{getReadingTime(text)} min read</div>
    )
}

Console

import getReadingTime from 'blog-reading-time';

const text = "this is a sample text";

console.log(`${getReadingTime(text)} min read`); 

API

getReadingTime(text)

  • text: the text to analyze

Package Sidebar

Install

npm i blog-reading-time

Weekly Downloads

5

Version

1.0.1

License

MIT

Unpacked Size

3.74 kB

Total Files

7

Last publish

Collaborators

  • fatihdelice