Skip to content

Commit

Permalink
v2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Invulner committed Apr 15, 2024
1 parent 48534fa commit 2157676
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
## 2.0.0

### Breaking Changes

- **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:
- `minutes`: Total estimated reading time expressed in whole minutes.
- `seconds`: Remaining seconds beyond the counted minutes.
- `total`: Total estimated reading time expressed in seconds.
- `text`: Human-readable summary of the reading time.

### Added

- **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.

## 1.1.15

- fix word splitter to count contractions like "don't" as one word.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "use-text-analyzer",
"version": "1.1.15",
"version": "2.0.0",
"description": "A React hook for analyzing text.",
"source": "src/index.ts",
"main": "dist/index.js",
Expand Down

0 comments on commit 2157676

Please sign in to comment.