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

Function extractReportLines

scripts/dashboard.js:404–407  ·  view source on GitHub ↗
(content, label)

Source from the content-addressed store, hash-verified

402 return String(value).replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
403}
404
405function extractReportLines(content, label) {
406 const pattern = new RegExp(`^(?:[-*]\\s*)?\\s*${escapeRegExp(label)}:\\s*(.+)$`, 'gim');
407 return Array.from(content.matchAll(pattern)).map((match) => match[1].trim());
408}
409
410function extractReportLine(content, label) {

Callers 2

extractReportLineFunction · 0.85
extractLastReportLineFunction · 0.85

Calls 1

escapeRegExpFunction · 0.70

Tested by

no test coverage detected