@anzerr/read.estimate
v1.0.8
Published
๐ Medium's like reading time estimation
Downloads
14
Readme
Intro
Medium's like reading time estimation.
Install
npm install --save git+https://[email protected]/anzerr/read.estimate.git
npm install --save @anzerr/read.estimate
Example
const estimate = require('read.estimate'),
fs = require('fs');
const out = estimate(fs.readFileSync('./README.md').toString(), {
strip: true,
wpm: 225, // WORDS_PER_MIN
ipm: 6, // IMAGE_PER_MIN
scale: 1,
pad: 0.25
});
console.log(out);
/*
{
count: { words: 84, images: 3 },
time: { words: 0.37333333333333335, images: 0.5 },
minutes: 0.8733333333333333,
text: '1 minutes'
}
*/