MCPcopy
hub / github.com/QwikDev/qwik / readFetch

Function readFetch

scripts/docs_sync/fetch_hackmd.ts:21–35  ·  view source on GitHub ↗
(file: string)

Source from the content-addressed store, hash-verified

19const KEY_VALUE = /^(.\w+):\s+(.*)$/;
20
21async function readFetch(file: string) {
22 const lines = await readLines(file);
23 if (lines[0] === '---') {
24 let row = 1;
25 while (row < lines.length && lines[row] !== '---') {
26 const line = lines[row++];
27 const match = KEY_VALUE.exec(line);
28 if (match) {
29 const [_, key, value] = match;
30 if (key === 'fetch') return value;
31 }
32 }
33 }
34 return null;
35}
36
37if (require.main === module) {
38 main(join(__dirname, '..', '..'));

Callers 1

mainFunction · 0.85

Calls 1

readLinesFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…