MCPcopy Create free account
hub / github.com/ccxt/ccxt / findByExtensionSync

Function findByExtensionSync

jsdoc2md.js:10–24  ·  view source on GitHub ↗
(dir, ext)

Source from the content-addressed store, hash-verified

8
9// Function to get all files that match the glob pattern
10const findByExtensionSync = (dir, ext) => {
11 const matchedFiles = [];
12
13 const files = fs.readdirSync(dir);
14
15 for (const file of files) {
16 const fileExt = path.extname(file);
17
18 if (fileExt === `.${ext}`) {
19 matchedFiles.push(path.join(dir,file));
20 }
21 }
22
23 return matchedFiles;
24};
25
26// main function
27(async ()=> {

Callers 1

jsdoc2md.jsFile · 0.85

Calls 1

pushMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…