@anzerr/read.estimate
TypeScript icon, indicating that this package has built-in type declarations

1.0.8ย โ€ขย Publicย โ€ขย Published

Intro

GitHub Actions status | linter GitHub Actions status | publish GitHub Actions status | test

Medium's like reading time estimation.

Install

npm install --save git+https://git@github.com/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'
}
*/

Package Sidebar

Install

npm i @anzerr/read.estimate

Weekly Downloads

0

Version

1.0.8

License

MIT

Unpacked Size

3.91 kB

Total Files

7

Last publish

Collaborators

  • anzerr