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);
filename.split('.').slice(0, -1).join('.')
script.json