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

Function markerValues

scripts/test-doc-surfaces.js:69–78  ·  view source on GitHub ↗
(content)

Source from the content-addressed store, hash-verified

67}
68
69function markerValues(content) {
70 const values = {};
71 const pattern = /<!-- GENERATED: ([a-z-]+) -->([\s\S]*?)<!-- \/GENERATED -->/g;
72 let match;
73 while ((match = pattern.exec(content)) !== null) {
74 if (!(match[1] in values)) values[match[1]] = [];
75 values[match[1]].push(match[2]);
76 }
77 return values;
78}
79
80function countOccurrences(content, needle) {
81 let count = 0;

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected