MCPcopy Create free account
hub / github.com/SethGammon/Citadel / extractBetween

Function extractBetween

scripts/test-demo.js:24–31  ·  view source on GitHub ↗
(src, startMarker, endMarker)

Source from the content-addressed store, hash-verified

22
23// ── Extract routing JS from HTML ──────────────────────────────────────────────
24
25function extractBetween(src, startMarker, endMarker) {
26 let si = src.indexOf(startMarker);
27 if (si === -1) return null;
28 si = src.indexOf('\n', si); // skip past the comment line's trailing chars
29 const ei = src.indexOf(endMarker, si);
30 if (ei === -1) return null;
31 return src.slice(si + 1, ei);
32}
33
34// TIER0, TIER2, TIER3, and route() live between these two comment anchors

Callers 1

test-demo.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected