MCPcopy Create free account
hub / github.com/NativeScript/NativeScript / enumerate

Function enumerate

packages/vite/configuration/javascript.ts:55–59  ·  view source on GitHub ↗
(filter: (ext: string) => boolean)

Source from the content-addressed store, hash-verified

53 return out;
54 }
55 function enumerate(filter: (ext: string) => boolean) {
56 const files: string[] = [];
57 for (const r of roots) walk(r, files);
58 return files.filter((f) => filter(f.split('.').pop() || ''));
59 }
60 function shouldExcludeAbsolute(p: string) {
61 const file = p.split('/').pop() || '';
62 if (file.startsWith('_')) return true;

Callers 1

loadFunction · 0.85

Calls 3

popMethod · 0.80
walkFunction · 0.70
filterMethod · 0.45

Tested by

no test coverage detected