MCPcopy Create free account
hub / github.com/editablejs/editable / equalOfCharacterType

Function equalOfCharacterType

packages/editor/src/utils/text.ts:72–82  ·  view source on GitHub ↗
(char: string, other: string)

Source from the content-addressed store, hash-verified

70 )
71
72const equalOfCharacterType = (char: string, other: string) => {
73 return (
74 !!char &&
75 !!other &&
76 !isSpace(char) &&
77 !isSpecialCharacters(char) &&
78 !isSpace(other) &&
79 !isSpecialCharacters(other) &&
80 isIdeograph(char) === isIdeograph(other)
81 )
82}
83
84interface Segment {
85 segment: string

Callers 3

getWordBackwardFunction · 0.85
getWordForwardFunction · 0.85
getWordRangeFunction · 0.85

Calls 3

isSpaceFunction · 0.85
isSpecialCharactersFunction · 0.85
isIdeographFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…