Releases
v0.22.0
v0.22.0 - Enhanced Unicode Support
Compare
Sorry, something went wrong.
No results found
Enhanced Unicode Support for reverse() and truncate()
Improved
Production-grade grapheme cluster handling for both reverse() and truncate() functions
ZWJ (Zero-Width Joiner) emoji sequences preserved: family emojis (👨👩👧👦), flags (🏴☠️, 🇺🇸), professions (👨⚕️, 👩🚀)
Emoji with skin tone modifiers correctly handled (👍🏽, 👋🏾)
Diacritics and combining marks preserved (café, Malmö, naïve, decomposed Unicode)
ASCII fast-path optimization maintains performance for simple strings (no performance regression)
Performance
Minimal bundle size impact for significant correctness improvement
reverse(): 67B → 307B (+240B for full Unicode support)
truncate(): 226B → 477B (+251B for full Unicode support)
Total bundle: 8.99 KB → 8.92 KB (slight decrease due to optimizations)
ASCII strings maintain original performance through fast-path checks
Test Coverage
26 new comprehensive test cases
11 tests for reverse() covering ZWJ sequences, skin tones, diacritics, and mixed content
15 tests for truncate() covering grapheme boundaries, emoji preservation, and edge cases
100% code coverage maintained across all functions
Documentation
Updated JSDoc examples to demonstrate Unicode handling capabilities
Enhanced documentation site with Unicode examples
Regenerated benchmark data reflecting new bundle sizes
You can’t perform that action at this time.