MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / firstLine

Function firstLine

lib/web/tern/tern.js:400–404  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

398 }
399
400 function firstLine(str) {
401 var end = str.indexOf("\n");
402 if (end < 0) return str;
403 return str.slice(0, end);
404 }
405
406 function findMatchingPosition(line, file, near) {
407 var pos = Math.max(0, near - 500), closest = null;

Callers 1

resolveFileFunction · 0.85

Calls 1

indexOfMethod · 0.80

Tested by

no test coverage detected