MCPcopy Create free account
hub / github.com/dailydotdev/apps / getResult

Method getResult

packages/shared/src/lib/textarea.ts:191–203  ·  view source on GitHub ↗
(getReplacement: GetReplacementFn, forcedType?: CursorType)

Source from the content-addressed store, hash-verified

189 };
190
191 private getResult(getReplacement: GetReplacementFn, forcedType?: CursorType) {
192 const type = forcedType ?? getCursorType(this.textarea);
193
194 if (type === CursorType.Isolated) {
195 return this.getIsolatedReplacement(getReplacement);
196 }
197
198 if (type === CursorType.Highlighted) {
199 return this.getHighlightedReplacement(getReplacement);
200 }
201
202 return this.getAdjacentReplacement(getReplacement);
203 }
204
205 async replaceWord(
206 getReplacement: GetReplacementFn,

Callers 1

replaceWordMethod · 0.95

Calls 1

getCursorTypeFunction · 0.85

Tested by

no test coverage detected