lib/functions/extensionAndFiletype.js
function getExtensionFromFiletype(filetype, codeExtensions) {
    let extension;
    if (filetype === 'HTML') {
        extension = '.html';
    } else if (filetype === 'JSON') {
        extension = '.json';
    } else {
        extension = codeExtensions[0];
    }

    return extension;
}
function getExtensionFromFiletype(filetype, codeExtensions) {
    let extension;
    if (filetype === 'HTML') {
        extension = '.html';
    } else if (filetype === 'JSON') {
        extension = '.json';
    } else {
        extension = codeExtensions[0];
    }

    return extension;
}
function getExtensionFromFiletype ( filetype , codeExtensions ) { let extension ; if ( filetype === 'HTML' ) { extension = '.html' ; } else if ( filetype === 'JSON' ) { extension = '.json' ; } else { extension = codeExtensions [ 0 ] ; } return extension ; }
Get the correct extension from the filetype

@param {String} filetype - Filetype we will convert.
@param {array} codeExtensions - Array of extensions we should treat as pushable for code files
@returns {String} method - The extension matching the filetype.
Get the correct extension from the filetype