Skip to content

Commit 2157676

Browse files
committed
v2.0.0
1 parent 48534fa commit 2157676

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
## 2.0.0
2+
3+
### Breaking Changes
4+
5+
- **Reading Time Format:** The format of the `readingTime` output in the `useTextAnalyzer` hook has been modified. Previously, `readingTime` was returned as a single integer representing the total number of seconds. Now, it is an object containing detailed aspects of the estimated reading time:
6+
- `minutes`: Total estimated reading time expressed in whole minutes.
7+
- `seconds`: Remaining seconds beyond the counted minutes.
8+
- `total`: Total estimated reading time expressed in seconds.
9+
- `text`: Human-readable summary of the reading time.
10+
11+
### Added
12+
13+
- **Custom Reading Speed:** Added a new optional parameter `wordsPerMinute` to the `useTextAnalyzer` hook. This parameter allows users to specify their reading speed, which the hook uses to calculate the estimated reading time. The default value is set to 250 words per minute.
14+
115
## 1.1.15
216

317
- fix word splitter to count contractions like "don't" as one word.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "use-text-analyzer",
3-
"version": "1.1.15",
3+
"version": "2.0.0",
44
"description": "A React hook for analyzing text.",
55
"source": "src/index.ts",
66
"main": "dist/index.js",

0 commit comments

Comments
 (0)