MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / offsetAt

Function offsetAt

source code/vim/textObjects.ts:87–88  ·  view source on GitHub ↗
(idx: number)

Source from the content-addressed store, hash-verified

85
86 const graphemeAt = (idx: number): string => graphemes[idx]?.segment ?? ''
87 const offsetAt = (idx: number): number =>
88 idx < graphemes.length ? graphemes[idx]!.index : text.length
89 const isWs = (idx: number): boolean => isVimWhitespace(graphemeAt(idx))
90 const isWord = (idx: number): boolean => isWordChar(graphemeAt(idx))
91 const isPunct = (idx: number): boolean => isVimPunctuation(graphemeAt(idx))

Callers 1

findWordObjectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected