MCPcopy
hub / github.com/codeaashu/claude-code / getGraphemeSegmenter

Function getGraphemeSegmenter

src/utils/intl.ts:13–20  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

11let wordSegmenter: Intl.Segmenter | null = null
12
13export function getGraphemeSegmenter(): Intl.Segmenter {
14 if (!graphemeSegmenter) {
15 graphemeSegmenter = new Intl.Segmenter(undefined, {
16 granularity: 'grapheme',
17 })
18 }
19 return graphemeSegmenter
20}
21
22/**
23 * Extract the first grapheme cluster from a string.

Callers 15

GlimmerMessageFunction · 0.85
renderMethod · 0.85
getGraphemeBoundariesMethod · 0.85
truncateToWidthFunction · 0.85
truncateStartToWidthFunction · 0.85
wrapTextFunction · 0.85
firstGraphemeFunction · 0.85
lastGraphemeFunction · 0.85
flushBufferFunction · 0.85
stringWidthJavaScriptFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected