MCPcopy Index your code
hub / github.com/callstack/react-native-paper / getFiles

Function getFiles

scripts/generate-ts-tests.js:19–34  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

17 .join('\n');
18
19const getFiles = () =>
20 glob
21 .sync(SOURCE_FILES_PATTERN)
22 .map((filePath) => {
23 const content = readFileSync(filePath, 'utf-8');
24 const match = EXAMPLE_REGEX.exec(content);
25 // JS regexp is stateful, you need to reset lastIndex each time
26 EXAMPLE_REGEX.lastIndex = 0;
27 return match
28 ? {
29 path: filePath,
30 content: transformContent(match[2]),
31 }
32 : null;
33 })
34 .filter(Boolean);
35
36const writeFiles = (files) => {
37 mkdirSync(DESTINATION_DIR);

Callers 1

Calls 1

transformContentFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…