Skip to content

barbarbar338/calculate-readtime

Repository files navigation

✨ Read Time Calculator

Customizable, easy-to-use, zero-dependency read time calculator.

Typedefinitions are built-in

build supportServer totalDownloads weeklyDownloads version stars license

🐮 Installation

  • Using NPM: npm install calculate-readtime --save
  • Using Yarn: yarn add calculate-readtime

🧶 Usage

// Simple usage
const { calculate } = require("calculate-readtime");

const myText = "Lorem ipsum dolor sit amet, consectetur adipiscing elit.";

calculate(myText); // => returns "less than a minute"

/* -------------------------------------------------------------------- */

// Advanced usage
const { calculate } = require("calculate-readtime");

const myText = "Lorem ipsum dolor sit amet, consectetur adipiscing elit.";
const options = {
	singular: "dakika",
	plural: "dakika",
	lessThanOne: "bir dakikadan kısa",
	wpm: 200,
};

calculate(myText, options); // => returns "bir dakikadan kısa"

🎈 Options

Name Type Required Default
wpm Number 200
lessThanOne String less than a minute
singular String minute
plural String minutes

🧦 Contributing

Feel free to use GitHub's features.

About

⏰ Calculates the approximate reading time for the paragraph you specify.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project