how to find the extension of a file fs node code example
Example: how to check file extension in node js
var path = require('path');
var ext = path.extname('/Users/Refsnes/demo_path.js');
console.log(ext);
var path = require('path');
var ext = path.extname('/Users/Refsnes/demo_path.js');
console.log(ext);