Skip to content

Commit 8af9e23

Browse files
committed
cleanup
1 parent edad29d commit 8af9e23

7 files changed

+681
-1351
lines changed

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,19 @@
77

88
A lightweight implementation of the [Unicode Text Segmentation (UAX \#29)](https://www.unicode.org/reports/tr29)
99

10-
- **Verified spec-compliance**: Up-to-date Unicode data, passes the official Unicode test suites, verifies full compliance with the `Intl.Segmenter` API via additional property-based testing, maintaining 100% coverage.
10+
- **Spec compliant**: Up-to-date Unicode data, verified by the official Unicode test suites and fuzzed with the native `Intl.Segmenter`, and maintaining 100% test coverage.
1111

12-
- **Excellent compatibility**: It works well on older browsers, edge runtimes, and React Native (Hermes).
12+
- **Excellent compatibility**: It works well on older browsers, edge runtimes, React Native (Hermes) and QuickJS.
1313

14-
- **Zero-dependencies**: It doesn't bloat `node_modules` or the networks tab. Just a small minimal snippet.
14+
- **Zero-dependencies**: It doesn't bloat `node_modules` or the network bandwidth. Like a small minimal snippet.
1515

16-
- **Small bundle size**: It effectively compresses Unicode data and provides a tree-shakeable format, eliminating unused codes.
16+
- **Small bundle size**: It effectively compresses the Unicode data and provides a bundler-friendly format.
1717

18-
- **Extremely efficient**: It's carefully optimized for performance, making it the fastest one in the ecosystem—outperforming even the built-in `Intl.Segmenter`.
18+
- **Extremely efficient**: It's carefully optimized for runtime performance, making it the fastest one in the ecosystem—outperforming even the built-in `Intl.Segmenter`.
1919

2020
- **TypeScript**: It's fully type-checked, and provides type definitions and JSDoc.
2121

22-
- **ESM-first**: It natively supports ES Modules, and still supports CommonJS.
22+
- **ESM-first**: It primarily supports ES modules, and still supports CommonJS.
2323

2424
> [!NOTE]
2525
> unicode-segmenter is now **[e18e] recommendation!**
@@ -42,7 +42,7 @@ And extra utilities for combined use cases.
4242

4343
- [`unicode-segmenter/emoji`](#export-unicode-segmenteremoji): Matches single codepoint emojis
4444
- [`unicode-segmenter/general`](#export-unicode-segmentergeneral): Matches single codepoint alphanumerics
45-
- [`unicode-segmenter/utils`](#export-unicode-segmenterutils): Handles UTF-16 codepoints
45+
- [`unicode-segmenter/utils`](#export-unicode-segmenterutils): Some utilities for handling codepoints
4646

4747
### Export `unicode-segmenter/grapheme`
4848
[![](https://edge.bundlejs.com/badge?q=unicode-segmenter/grapheme&treeshake=[*])](https://bundlejs.com/?q=unicode-segmenter%2Fgrapheme&treeshake=%5B*%5D)
@@ -254,7 +254,7 @@ Since [Hermes doesn't support the `Intl.Segmenter` API](https://github.com/faceb
254254

255255
| Name | Unicode® | ESM? | Size | Size (min) | Size (min+gzip) | Size (min+br) |
256256
|------------------------------|----------|------|----------:|-----------:|----------------:|--------------:|
257-
| `unicode-segmenter/grapheme` | 16.0.0 | ✔️ | 17,313 | 12,783 | 5,285 | 3,946 |
257+
| `unicode-segmenter/grapheme` | 16.0.0 | ✔️ | 15,929 | 12,110 | 5,049 | 3,740 |
258258
| `graphemer` | 15.0.0 | ✖️ ️| 410,435 | 95,104 | 15,752 | 10,660 |
259259
| `grapheme-splitter` | 10.0.0 | ✖️ | 122,252 | 23,680 | 7,852 | 4,841 |
260260
| `@formatjs/intl-segmenter`* | 15.0.0 | ✖️ | 491,043 | 318,721 | 54,248 | 34,380 |
@@ -270,9 +270,9 @@ Since [Hermes doesn't support the `Intl.Segmenter` API](https://github.com/faceb
270270

271271
| Name | Bytecode size | Bytecode size (gzip)* |
272272
|------------------------------|--------------:|----------------------:|
273-
| `unicode-segmenter/grapheme` | 24,386 | 12,690 |
274-
| `graphemer` | 133,949 | 31,710 |
275-
| `grapheme-splitter` | 63,810 | 19,125 |
273+
| `unicode-segmenter/grapheme` | 23,037 | 12,058 |
274+
| `graphemer` | 133,952 | 31,708 |
275+
| `grapheme-splitter` | 63,813 | 19,123 |
276276

277277
* It would be compressed when included as an app asset.
278278

0 commit comments

Comments
 (0)