MCPcopy Create free account
hub / github.com/observablehq/framework / _bisectLeft

Method _bisectLeft

src/sourcemap.ts:22–31  ·  view source on GitHub ↗
(index: number)

Source from the content-addressed store, hash-verified

20 this._edits = [];
21 }
22 private _bisectLeft(index: number): number {
23 let lo = 0;
24 let hi = this._edits.length;
25 while (lo < hi) {
26 const mid = (lo + hi) >>> 1;
27 if (this._edits[mid].start < index) lo = mid + 1;
28 else hi = mid;
29 }
30 return lo;
31 }
32 private _bisectRight(index: number): number {
33 let lo = 0;
34 let hi = this._edits.length;

Callers 1

replaceLeftMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected