MCPcopy Create free account
hub / github.com/Dart-Code/Dart-Code / rangesEqual

Function rangesEqual

src/shared/utils/positions.ts:3–5  ·  view source on GitHub ↗
(r1: Range, r2: Range)

Source from the content-addressed store, hash-verified

1import { Position, Range } from "../interfaces";
2
3export function rangesEqual(r1: Range, r2: Range): boolean {
4 return positionsEqual(r1.start, r2.start) && positionsEqual(r1.end, r2.end);
5}
6
7export function positionsEqual(p1: Position, p2: Position): boolean {
8 return p1.line === p2.line && p1.character === p2.character;

Callers 2

testDiscoveredMethod · 0.90

Calls 1

positionsEqualFunction · 0.85

Tested by

no test coverage detected