MCPcopy Create free account
hub / github.com/ceifa/wasmoon / walk

Function walk

test/luatests.js:6–16  ·  view source on GitHub ↗
(dir)

Source from the content-addressed store, hash-verified

4import { resolve } from 'node:path'
5
6async function* walk(dir) {
7 const dirents = await readdir(dir, { withFileTypes: true })
8 for (const dirent of dirents) {
9 const res = resolve(dir, dirent.name)
10 if (dirent.isDirectory()) {
11 yield* walk(res)
12 } else {
13 yield res
14 }
15 }
16}
17
18const factory = new LuaFactory()
19const testsPath = import.meta.resolve('../lua/testes')

Callers 1

luatests.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected