Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions .changeset/grapheme-counter-entry.md

This file was deleted.

12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# unicode-segmenter

## 0.18.0

### Minor Changes

- a6b246a: Add `unicode-segmenter/grapheme-counter`, a standalone fast counter for extended grapheme clusters.

`countGraphemes()` from the new entry returns exactly the same result as the one in `unicode-segmenter/grapheme`, but runs the boundary rules directly without allocating segment objects or slicing strings:

- 4\~7x faster counting on V8, ~4x on Hermes, with zero allocation
- Standalone entry (4,852 bytes minified, 2,353 bytes gzipped); doesn't carry the segmenter code, and the segmenter entry doesn't carry the counter - even without tree-shaking
- The `countGraphemes()` wrapper in `unicode-segmenter/grapheme` is unchanged and stays as the convenience API

## 0.17.0

### Minor Changes
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": "unicode-segmenter",
"version": "0.17.0",
"version": "0.18.0",
"type": "module",
"description": "A lightweight implementation of the Unicode Text Segmentation (UAX #29)",
"license": "MIT",
Expand Down
Loading