https://github.com/anzerr/read.estimate
📚 Medium's like reading time estimation
https://github.com/anzerr/read.estimate
estimate medium nodejs text util
Last synced: 2 months ago
JSON representation
📚 Medium's like reading time estimation
- Host: GitHub
- URL: https://github.com/anzerr/read.estimate
- Owner: anzerr
- License: mit
- Created: 2019-09-22T13:59:55.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-01-21T16:32:13.000Z (over 4 years ago)
- Last Synced: 2025-02-04T03:44:50.000Z (over 1 year ago)
- Topics: estimate, medium, nodejs, text, util
- Language: JavaScript
- Homepage:
- Size: 43.9 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
### `Intro`



Medium's like reading time estimation.
#### `Install`
``` bash
npm install --save git+https://git@github.com/anzerr/read.estimate.git
npm install --save @anzerr/read.estimate
```
### `Example`
``` javascript
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'
}
*/
```