File extension - Retrieves the file extension from a string.
/**
* Retrieves the file extension from a string.
*
* @param {string} filename
* @returns {string}
*/
function fileExtension(filename) {
return filename.substr(filename.lastIndexOf('.') + 1);
}