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

Function extractBlockLine

scripts/dashboard.js:419–422  ·  view source on GitHub ↗
(content, heading)

Source from the content-addressed store, hash-verified

417 return lines.length > 0 ? lines[lines.length - 1] : null;
418}
419
420function extractBlockLine(content, heading) {
421 const match = content.match(new RegExp(`^${escapeRegExp(heading)}\\s*\\r?\\n([^\\r\\n]+)`, 'im'));
422 return match ? match[1].trim() : null;
423}
424
425function freshness(status, staleReasons) {

Callers 1

readOperatorArtifactsFunction · 0.85

Calls 1

escapeRegExpFunction · 0.70

Tested by

no test coverage detected