MCPcopy Create free account
hub / github.com/ReactiveX/rxjs / allPaths

Function allPaths

scripts/check-package-docs.mjs:95–108  ·  view source on GitHub ↗
(root)

Source from the content-addressed store, hash-verified

93}
94
95async function allPaths(root) {
96 const paths = [];
97 async function visit(relativeDirectory) {
98 const entries = await readdir(path.join(root, relativeDirectory), { withFileTypes: true });
99 for (const entry of entries) {
100 if (['.git', '.cache', '.tshy-build', 'dist', 'node_modules'].includes(entry.name)) continue;
101 const relativePath = path.posix.join(relativeDirectory, entry.name);
102 paths.push(relativePath);
103 if (entry.isDirectory()) await visit(relativePath);
104 }
105 }
106 await visit('');
107 return paths;
108}
109
110if (import.meta.url === pathToFileURL(process.argv[1] ?? '').href) {
111 checkPackageDocs()

Callers 1

checkPackageDocsFunction · 0.85

Calls 1

visitFunction · 0.70

Tested by

no test coverage detected