MCPcopy Create free account
hub / github.com/sql-js/sql.js / getBetween

Function getBetween

GUI/codemirror/lib/codemirror.js:6493–6503  ·  view source on GitHub ↗
(doc, start, end)

Source from the content-addressed store, hash-verified

6491 // Get the part of a document between two positions, as an array of
6492 // strings.
6493 function getBetween(doc, start, end) {
6494 var out = [], n = start.line;
6495 doc.iter(start.line, end.line + 1, function(line) {
6496 var text = line.text;
6497 if (n == end.line) text = text.slice(0, end.ch);
6498 if (n == start.line) text = text.slice(start.ch);
6499 out.push(text);
6500 ++n;
6501 });
6502 return out;
6503 }
6504 // Get the lines between from and to, as array of strings.
6505 function getLines(doc, from, to) {
6506 var out = [];

Callers 3

makeChangeSingleDocFunction · 0.85
codemirror.jsFile · 0.85
historyChangeFromChangeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…