MCPcopy Index your code
hub / github.com/nodejs/node / filterFilesInDir

Function filterFilesInDir

eslint.config.mjs:30–34  ·  view source on GitHub ↗
(dirpath, filterFn)

Source from the content-addressed store, hash-verified

28nodeCore.RULES_DIR = fileURLToPath(new URL('./tools/eslint-rules', import.meta.url));
29
30function filterFilesInDir(dirpath, filterFn) {
31 return readdirSync(dirpath)
32 .filter(filterFn)
33 .map((f) => `${dirpath}/${f}`);
34}
35
36// The Module._resolveFilename() monkeypatching is to make it so that ESLint is able to
37// dynamically load extra modules that we install with it.

Callers 1

eslint.config.mjsFile · 0.85

Calls 3

mapMethod · 0.65
filterMethod · 0.65
readdirSyncFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…