What's wrong with this entry?
Anonymous. No account, no email.
The isDirEmptySync function now includes an existence check before checking if a directory is empty. This prevents errors when working with non-existent directories.
// Old behavior: Would error if directory doesn't exist
function isDirEmptySync(path) {
return fs.isDirEmptySync(path);
}
// New behavior: Returns true for non-existent directories
function isDirEmptySync(path) {
if (!fs.existsSync(path)) return true;
return fs.isDirEmptySync(path);
}