MCPcopy
hub / github.com/garrytan/gstack / lineContaining

Function lineContaining

lib/redact-engine.ts:526–531  ·  view source on GitHub ↗
(body: string, offset: number)

Source from the content-addressed store, hash-verified

524}
525
526function lineContaining(body: string, offset: number): string {
527 const start = body.lastIndexOf("\n", offset - 1) + 1;
528 let end = body.indexOf("\n", offset);
529 if (end === -1) end = body.length;
530 return body.slice(start, end);
531}
532
533// ── Exit-code helper for the CLI shim ─────────────────────────────────────────
534

Callers 1

applyRedactionsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected