# graphemesplit

> [![npm version](https://badge.fury.io/js/graphemesplit.svg)](https://badge.fury.io/js/graphemesplit)

Latest version **2.6.0** (published 2025-01-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install graphemesplit
pnpm add graphemesplit
yarn add graphemesplit
bun add graphemesplit
```

## Health

**Score 30/100 (F)** — status: maintenance-mode.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.6.0 |
| Published | 2025-01-29 |
| First published | 2018-02-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 18.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Nao Yonashiro |
| Maintainers | orisano |

## Links

- npm: https://www.npmjs.com/package/graphemesplit
- Repository: https://github.com/orisano/graphemesplit
- Homepage: https://github.com/orisano/graphemesplit#readme
- Issues: https://github.com/orisano/graphemesplit/issues
- npm.io page: https://npm.io/package/graphemesplit

## Dependencies (2)

- [js-base64](https://npm.io/package/js-base64.md) ^3.6.0
- [unicode-trie](https://npm.io/package/unicode-trie.md) ^2.0.0

## Recent versions

- 2.6.0 (latest) — 2025-01-29
- 2.5.1 — 2025-01-25
- 2.5.0 — 2025-01-25
- 2.4.4 — 2021-09-15
- 2.4.3 — 2021-05-21
- 2.4.2 — 2020-09-15
- 2.4.1 — 2020-08-31
- 2.4.0 — 2020-04-29
- 2.3.0 — 2020-03-09
- 2.2.0 — 2019-07-18
- 2.1.1 — 2019-03-11
- 2.1.0 — 2019-03-11
- 2.0.3 — 2019-02-24
- 2.0.1 — 2018-08-14
- 2.0.0 — 2018-08-11
- … 3 more at https://npm.io/package/graphemesplit/versions

## README

# graphemesplit
[![npm version](https://badge.fury.io/js/graphemesplit.svg)](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)

---
_Source: https://npm.io/package/graphemesplit · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
