node js get file name without extension

JavaScript
filename.split('.').slice(0, -1).join('.')

Source

Also in JavaScript: