MCPcopy
hub / github.com/witheve/Eve / comparePositions

Function comparePositions

src/util.ts:144–149  ·  view source on GitHub ↗
(a:Position, b:Position)

Source from the content-addressed store, hash-verified

142}
143
144export function comparePositions(a:Position, b:Position) {
145 if(a.line === b.line && a.ch === b.ch) return 0;
146 if(a.line > b.line) return 1;
147 if(a.line === b.line && a.ch > b.ch) return 1;
148 return -1;
149}
150
151export function compareRanges(a:Range, b:Range) {
152 let first = comparePositions(a.from, b.from);

Callers 12

updateElisionMethod · 0.90
formattingChangeFunction · 0.90
markBetweenMethod · 0.90
inCodeBlockMethod · 0.90
formatSpanMethod · 0.90
EditorClass · 0.90
IDEClass · 0.90
formattingChangeFunction · 0.90
onChangeMethod · 0.90
compareRangesFunction · 0.85
samePositionFunction · 0.85
whollyEnclosedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected