Jak sprawdzić rozszerzenie pliku w węźle JS
var path = require('path');
var ext = path.extname('/Users/Refsnes/demo_path.js');
console.log(ext);
Super Starling
var path = require('path');
var ext = path.extname('/Users/Refsnes/demo_path.js');
console.log(ext);
var path = require('path')
path.extname('index.html')
// returns
'.html'