function getFileExtension(filename) {
    return path.extname(filename).slice(1).split('?')[0];
}
Return the file extension from a filename, without the leading dot and without the query string (if any).

@param {string} filename
@returns {string}