Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/iamtraction/read-time
A Node.JS library to estimate the time it will take to read a given text.
https://github.com/iamtraction/read-time
nodejs npm read-time read-time-estimator reading-time reading-time-estimator typescript yarn
Last synced: 25 days ago
JSON representation
A Node.JS library to estimate the time it will take to read a given text.
- Host: GitHub
- URL: https://github.com/iamtraction/read-time
- Owner: iamtraction
- License: mpl-2.0
- Created: 2021-02-03T16:30:12.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-02-04T17:10:35.000Z (almost 4 years ago)
- Last Synced: 2024-10-03T18:54:33.103Z (about 1 month ago)
- Topics: nodejs, npm, read-time, read-time-estimator, reading-time, reading-time-estimator, typescript, yarn
- Language: JavaScript
- Homepage: https://npmjs.com/@iamtraction/read-time
- Size: 30.3 KB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.markdown
- License: LICENSE
Awesome Lists containing this project
README
# Read Time
A [Node.JS](https://nodejs.org) library to estimate the time it will take to
read a given text.[![GitHub release](https://img.shields.io/github/release/iamtraction/read-time.svg?style=flat)](https://github.com/iamtraction/read-time/releases)
[![Dependencies](https://david-dm.org/iamtraction/read-time.svg)](https://david-dm.org/iamtraction/read-time)
[![Known Vulnerabilities](https://snyk.io/test/github/iamtraction/read-time/badge.svg?targetFile=package.json)](https://snyk.io/test/github/iamtraction/read-time?targetFile=package.json)
[![license](https://img.shields.io/github/license/iamtraction/read-time.svg)](LICENSE)
![Node.js CI](https://github.com/iamtraction/read-time/workflows/Node.js%20CI/badge.svg)
![Node.js Package](https://github.com/iamtraction/read-time/workflows/Node.js%20Package/badge.svg)## Installation
```bash
# Stable version, from npm repository
npm install --save @iamtraction/read-time# Latest version, from GitHub repository
npm install --save iamtraction/read-time
```## Usage
```js
// If you've installed from npm
const readTime = require("@iamtraction/read-time");// If you've installed from GitHub
const readTime = require("read-time");
```#### Method: `calculate(text, options)`
```js
readTime.calculate(text, options);
```
| Parameter | Type | Optional | Default | Description |
|-|-|-|-|-|
| `text` | `String` | No | - | Text for which you want to estimate the read time. |
| `options` | `Object` | Yes | - | Options for read time estimation. |
| `options.wpm` | `Number` | Yes | `250` | Reading speed in words per minute. |#### Returns: `string`