Change the param name to clarify the intent

master
Frédéric Matte 2023-09-30 05:00:07 -04:00
parent e3c8fceb42
commit b9a8b2c30c
1 changed files with 2 additions and 2 deletions

View File

@ -1,10 +1,10 @@
import { readdir } from 'node:fs/promises'
import { join } from 'node:path'
const walkDir = async function* (dir = '.', ignores = []) {
const walkDir = async function* (dir = '.', exclude = []) {
const files = await readdir(dir, { withFileTypes: true })
for (const file of files) {
if (ignores.includes(file.name)) continue
if (exclude.includes(file.name)) continue
if (file.isDirectory()) {
yield* walkDir(join(dir, file.name))