MCPcopy Index your code
hub / github.com/nodejs/nodejs.org / getMarkdownFiles

Function getMarkdownFiles

apps/site/next.helpers.mjs:35–47  ·  view source on GitHub ↗
(root, cwd, exclude = [])

Source from the content-addressed store, hash-verified

33 * @returns {Promise<Array<string>>} a promise containing an array of paths
34 */
35export const getMarkdownFiles = async (root, cwd, exclude = []) => {
36 const cacheKey = `${root}${cwd}${exclude.join('')}`;
37
38 if (!globCacheByPath.has(cacheKey)) {
39 const result = Array.fromAsync(
40 glob('**/*.{md,mdx}', { root, cwd, exclude })
41 );
42
43 globCacheByPath.set(cacheKey, result);
44 }
45
46 return globCacheByPath.get(cacheKey);
47};

Callers 2

getDynamicRouterFunction · 0.90
generateBlogDataFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected