Graphemer is a JavaScript library designed to accurately split strings into user-perceived characters, correctly handling complex scenarios including emojis and grapheme clusters. Versions 1.3.0 and 1.4.0 share a consistent core functionality focused on precise string segmentation. Comparing the two, version 1.4.0, released in September 2022, features an increase in its unpacked size to 811810 compared to version 1.3.0's 804382 released in December 2021, suggesting expanded or refined data tables to improve grapheme handling. While the core development dependencies remain the same (including testing with Tape, code formatting with Prettier, and TypeScript for development), the growth hints at enhanced support for newer or more complex Unicode characters.
Developers choosing between these versions should prioritize 1.4.0 for its potentially improved accuracy in handling diverse and evolving character sets. If the target application deals with a wide variety of Unicode characters, especially newer emojis or less common grapheme combinations, the updated version likely provides improved results. Version 1.3.0 might still be a suitable choice for projects with limited character set requirements or those seeking a slightly smaller package size. The slight difference in size means minimal impact on performance, but ensuring accurate grapheme parsing especially with user-generated content should guide the decision.
The are not vulnerabilities for the version 1.4.0 of the package graphemer