node get file extension fs code example
Example: how to read file extension in a folder in node js
fs.readdir('./', (err, files) => {
files.forEach(file => {
// console.log(file);
// read extension
const extension = file.split(".").pop();
});
})