https://github.com/orisano/graphemesplit
UAX #29
https://github.com/orisano/graphemesplit
Last synced: over 1 year ago
JSON representation
UAX #29
- Host: GitHub
- URL: https://github.com/orisano/graphemesplit
- Owner: orisano
- License: mit
- Created: 2018-01-31T14:47:18.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2025-01-30T21:40:50.000Z (over 1 year ago)
- Last Synced: 2025-04-11T19:08:07.146Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 72.3 KB
- Stars: 64
- Watchers: 3
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# graphemesplit
[](https://badge.fury.io/js/graphemesplit)
A JavaScript implementation of the Unicode 16.0 grapheme cluster breaking algorithm. ([UAX #29](http://www.unicode.org/reports/tr29/#Grapheme_Cluster_Boundaries))
## Installation
```bash
npm install graphemesplit
```
## How to use
```javascript
const split = require('graphemesplit')
split('Z͑ͫ̓ͪ̂ͫ̽͏̴̙̤̞͉͚̯̞̠͍A̴̵̜̰͔ͫ͗͢L̠ͨͧͩ͘G̴̻͈͍͔̹̑͗̎̅͛́Ǫ̵̹̻̝̳͂̌̌͘!͖̬̰̙̗̿̋ͥͥ̂ͣ̐́́͜͞') // => ['Z͑ͫ̓ͪ̂ͫ̽͏̴̙̤̞͉͚̯̞̠͍','A̴̵̜̰͔ͫ͗͢','L̠ͨͧͩ͘','G̴̻͈͍͔̹̑͗̎̅͛́','Ǫ̵̹̻̝̳͂̌̌͘','!͖̬̰̙̗̿̋ͥͥ̂ͣ̐́́͜͞']
```
## Author
Nao Yonashiro(@orisano)
## License
MIT
## References
[foliojs/grapheme-breaker](https://github.com/foliojs/grapheme-breaker)
[Unicode® Standard Annex #29](https://unicode.org/reports/tr29/)
[GraphemeBreakProperty.txt](https://www.unicode.org/Public/16.0.0/ucd/auxiliary/GraphemeBreakProperty.txt)
[GraphemeBreakTest.txt](https://www.unicode.org/Public/16.0.0/ucd/auxiliary/GraphemeBreakTest.txt)
[DerivedCoreProperties.txt](https://www.unicode.org/Public/16.0.0/ucd/DerivedCoreProperties.txt)
[emoji-data.txt](https://www.unicode.org/Public/16.0.0/ucd/emoji/emoji-data.txt)