MCPcopy Index your code
hub / github.com/itwanger/toBeBetterJavaer / findLineStart

Function findLineStart

scripts/sync-sidebar.js:369–372  ·  view source on GitHub ↗
(source, index)

Source from the content-addressed store, hash-verified

367}
368
369function findLineStart(source, index) {
370 const lineBreak = source.lastIndexOf("\n", index);
371 return lineBreak === -1 ? 0 : lineBreak + 1;
372}
373
374function findRouteArray(source, route) {
375 const routePattern = new RegExp(`(["'])${escapeRegExp(route)}\\1\\s*:\\s*\\[`);

Callers 1

appendMissingEntriesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected