MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / lineContaining

Function lineContaining

graph-ui/tools/smoke-w2b.mjs:116–122  ·  view source on GitHub ↗

* Die Zeile, in der ein Ausdruck steht, aus der Datei gelesen. * * Eine feste Zahl waere eine zweite Wahrheit ueber das Fixture, die beim * naechsten Zeilenumbruch still falsch wird. Gezaehlt wird 1-basiert, so wie * der Graph und Monaco zaehlen.

(source, needle)

Source from the content-addressed store, hash-verified

114 * der Graph und Monaco zaehlen.
115 */
116function lineContaining(source, needle) {
117 const index = source.split('\n').findIndex((line) => line.includes(needle));
118 if (index < 0) {
119 throw new Error(`"${needle}" steht nicht in ${SERVICE_FILE}`);
120 }
121 return index + 1;
122}
123
124const rowSelector = (path) => `[data-testid="atlas-tree-row"][data-path="${path}"]`;
125

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected