
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
reading-time
Advanced tools
Medium's like reading time estimation.
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?
npm install reading-time --production
const readingTime = require('reading-time');
const stats = readingTime(text);
// ->
// stats: {
// text: '1 min read',
// minutes: 1,
// time: 60000,
// words: 200
// }
const {readingTimeStream} = require('reading-time');
fs.createReadStream('foo')
.pipe(readingTimeStream)
.on('data', stats => {
// ...
});
readingTime(text, options?)
text: the text to analyzeoptions.wordsPerMinute: (optional) the words per minute an average reader can read (default: 200)options.wordBound: (optional) a function that returns a boolean value depending on if a character is considered as a word bound (default: spaces, new lines and tabulations)This library has been optimized for alphabetical languages and CJK languages, but may not behave correctly for other languages that don't use spaces for work bounds. If you find the behavior of this library to deviate significantly from your expectation, issues or contributions are welcomed!
The 'reading-time-estimator' package provides similar functionality to 'reading-time' by estimating the reading time of a given text. It also allows customization of the words per minute rate. However, 'reading-time' is more widely used and has more frequent updates.
The 'read-time-estimate' package offers reading time estimation with additional features like handling HTML content and providing more detailed statistics. It is a good alternative to 'reading-time' if you need to process HTML content directly.
FAQs
Medium's like reading time estimation.
The npm package reading-time receives a total of 543,932 weekly downloads. As such, reading-time popularity was classified as popular.
We found that reading-time demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.