It is unknown whether this package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers




JSR Score
29%
Published
3 months ago (0.1.1)
export async function tree(dir: string): Promise<string[]> { const out = []; for await (const entry of Deno.readDir(dir)) { out.push(entry.name); } return out; } if (import.meta.main) { const files = await tree("."); console.log(files); } /* deno --allow-read ./tree/main.ts deno -R ./tree/main.ts deno compile -R ./tree/main.ts deno compile --target aarch64-unknown-linux-gnu --output tree.a64 -R ./tree/main.ts [possible values: x86_64-unknown-linux-gnu, aarch64-unknown-linux-gnu, x86_64-pc-windows-msvc, x86_64-apple-darwin, aarch64-apple-darwin] deno compile --lite --no-check --target x86_64-unknown-linux-gnu -R ./tree/main.ts */