MCPcopy Index your code
hub / github.com/csev/py4e / getLineAt

Function getLineAt

tools/pythonauto/static/codemirrorepl/codemirrorepl.js:2932–2941  ·  view source on GitHub ↗
(chunk, n)

Source from the content-addressed store, hash-verified

2930 };
2931
2932 function getLineAt(chunk, n) {
2933 while (!chunk.lines) {
2934 for (var i = 0;; ++i) {
2935 var child = chunk.children[i], sz = child.chunkSize();
2936 if (n < sz) { chunk = child; break; }
2937 n -= sz;
2938 }
2939 }
2940 return chunk.lines[n];
2941 }
2942 function lineNo(line) {
2943 if (line.parent == null) return null;
2944 var cur = line.parent, no = indexOf(cur.lines, line);

Callers 1

getLineFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected