Version Packages#136
Conversation
commit: |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #136 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 11 11
Lines 1005 1005
=========================================
Hits 1005 1005 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
I'm debating whether or not to release this. The fast alternative to the It avoids the iterator protocol overhead of count-only paths, uses no heap, and is at least 4 times faster per segment. However, most of the code overlaps with the full segmenter. I could either completely replace the existing API with this or provide a separate "lite entry" with the same API. While it is a good alternative in most cases where only counting is needed, I am concerned that splitting API entries for a snippet that is only 100-200 bytes after compression seems overdesigned. |
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
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 inunicode-segmenter/grapheme, but runs the boundary rules directly without allocating segment objects or slicing strings:countGraphemes()wrapper inunicode-segmenter/graphemeis unchanged and stays as the convenience API