Javascript – How can I check filenames to avoid pushing them into array?
I have this code in my node script const fs = require('fs-extra'); const backupPath = path.join( __dirname , 'wp-backup'); const excludedResources = ['.DS_Store', 'dep.js', 'node_modules']; const wpFolders = []; const wpFiles = []; fs.readdir( __dirname, { withFileTypes: true }, (err,…