Skip to content

Commit 7b61557

Browse files
committed
fix typo
1 parent 88a22e2 commit 7b61557

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ Since [Hermes doesn't support the `Intl.Segmenter` API](https://github.com/faceb
256256

257257
| Name | Unicode® | ESM? | Size | Size (min) | Size (min+gzip) | Size (min+br) |
258258
|------------------------------|----------|------|----------:|-----------:|----------------:|--------------:|
259-
| `unicode-segmenter/grapheme` | 16.0.0 | ✔️ | 16,053 | 12,150 | 5,070 | 3,752 |
259+
| `unicode-segmenter/grapheme` | 16.0.0 | ✔️ | 16,056 | 12,150 | 5,070 | 3,761 |
260260
| `graphemer` | 15.0.0 | ✖️ ️| 410,435 | 95,104 | 15,752 | 10,660 |
261261
| `grapheme-splitter` | 10.0.0 | ✖️ | 122,252 | 23,680 | 7,852 | 4,841 |
262262
| `@formatjs/intl-segmenter`* | 15.0.0 | ✖️ | 603,285 | 369,560 | 72,218 | 49,416 |

src/grapheme.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ export function* graphemeSegments(input) {
108108
// Note: Lazily update `consonant` and `linker` state
109109
// which is a extra overhead only for Hindi text.
110110
if (!consonant && catBefore === 0) {
111-
consonant = isIndicConjunctCosonant(cp);
111+
consonant = isIndicConjunctConsonant(cp);
112112
} else if (catBefore === 3 /* Extend */) {
113113
// Note: \p{InCB=Linker} is a subset of \p{Extend}
114114
linker = isIndicConjunctLinker(cp);
@@ -142,7 +142,7 @@ export function* graphemeSegments(input) {
142142

143143
} else if (catAfter === 0 /* Any */ && cp >= 2325) {
144144
// Note: Put GB9c rule checking here to reduce.
145-
incb = consonant && linker && (consonant = isIndicConjunctCosonant(cp));
145+
incb = consonant && linker && (consonant = isIndicConjunctConsonant(cp));
146146
// It cannot be both a linker and a consonant.
147147
linker = linker && !consonant;
148148
}
@@ -255,7 +255,7 @@ function cat(cp, cache) {
255255
* @param {number} cp
256256
* @return {boolean}
257257
*/
258-
function isIndicConjunctCosonant(cp) {
258+
function isIndicConjunctConsonant(cp) {
259259
return findUnicodeRangeIndex(cp, consonant_ranges) >= 0;
260260
}
261261

0 commit comments

Comments
 (0)