MCPcopy Index your code
hub / github.com/darkreader/darkreader / walk

Function walk

tasks/translate.js:182–194  ·  view source on GitHub ↗
(dir)

Source from the content-addressed store, hash-verified

180
181 /** @type {(dir: string) => Promise<void>} */
182 const walk = async (dir) => {
183 const entries = await fs.readdir(dir);
184 const matched = entries.filter((f) => f === `${locale}.config` || f.endsWith(`.${locale}.config`));
185 results.push(...matched);
186
187 for (const e of entries) {
188 const p = `${dir}/${e}`;
189 const stat = await fs.stat(p);
190 if (stat.isDirectory()) {
191 walk(p);
192 }
193 }
194 };
195
196 await walk(LOCALES_ROOT);
197

Callers 1

getLocaleFilesFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected