sisoe24 / Nuke-Tools

Logical operator can be refactored to optional chain JS-W1044
Anti-pattern
Minor
15 hours ago7 months old
Prefer using an optional chain expression instead, as it's more concise and easier to read
 33    fs.readdirSync(dir).forEach(function (file) {
 34        file = dir + path.sep + file;
 35        const stat = fs.statSync(file);
 36        if (stat && stat.isDirectory()) { 37            /* Recurse into a subdirectory */
 38            results = results.concat(osWalk(file));
 39        } else {