Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

blog-reading-time

fatihdelice91MIT1.0.1

Blog reading time estimation.

read, time, read time, reading time, blog, react, words per minute

readme

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