MCPcopy Create free account
hub / github.com/ternjs/tern / firstLine

Function firstLine

lib/tern.js:407–411  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

405 }
406
407 function firstLine(str) {
408 var end = str.indexOf("\n");
409 if (end < 0) return str;
410 return str.slice(0, end);
411 }
412
413 function findMatchingPosition(line, file, near) {
414 var pos = Math.max(0, near - 500), closest = null;

Callers 1

resolveFileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected