{"library":"grapheme-splitter","type":"library","category":null,"description":"grapheme-splitter is a JavaScript library designed to accurately segment strings into user-perceived characters, known as extended grapheme clusters, as defined by Unicode Standard Annex #29 (UAX #29) Default Grapheme Cluster Boundaries. It addresses fundamental issues in JavaScript's native string handling, where `String.length` and simple character iteration can misrepresent visual character counts due to multi-codepoint emojis (e.g., `🏳️‍🌈`), combining marks (like in German 'ü', Spanish 'ñ', or Hindi text), and 'Zalgo' text. Unlike `String.normalize()` or libraries like `punycode.js`, `grapheme-splitter` provides a comprehensive solution for these complex Unicode cases. The current stable version is 1.0.4, indicating a mature and stable codebase with an infrequent release cadence focused on maintenance rather than rapid feature additions. Its key differentiator is precise adherence to Unicode grapheme cluster rules, making it essential for text processing, input field validation, and display logic in internationalized applications.","language":"javascript","status":"active","version":"1.0.4","tags":["javascript","utf-8","strings","emoji","split"],"last_verified":"Wed May 27","install":[{"cmd":"npm install grapheme-splitter","imports":["const GraphemeSplitter = require('grapheme-splitter');","import GraphemeSplitter from 'grapheme-splitter';","const splitter = new GraphemeSplitter();\nsplitter.splitGraphemes('string');"]},{"cmd":"yarn add grapheme-splitter","imports":[]},{"cmd":"pnpm add grapheme-splitter","imports":[]}],"homepage":null,"github":"https://github.com/orling/grapheme-splitter","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/grapheme-splitter","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/grapheme-splitter/compatibility"}}