1.0.1 • Published 3 years ago
blog-reading-time v1.0.1
blog-reading-time
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-timeit just returns number value!
Installation
npm i blog-reading-timeUsage
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