Develop/utils/generateMarkdown.js
// If there is no license, return an empty string
If there is no license, return an empty string
If there is no license return an empty string
function renderLicenseBadge(license) {
  let badge = '';
  switch(license){
    case 'MIT':
      badge = 'https://img.shields.io/badge/license-MIT-red.svg';
      break;
    case 'APACHE 2.0':
      badge = 'https://img.shields.io/badge/license-Apache_2.0-blue.svg';
      break;
    case 'GPL 3.0':
      badge = "https://img.shields.io/badge/license-GPLv3-brightgreen.svg";
      break;
    case 'BSD 3':
      badge = "https://img.shields.io/badge/license-BSD_3--Clause-blueviolet.svg";
      break;    
    case 'None':
      badge = '';
  };
  if(badge === '') {
    return ``;
  } else {
    return `[![License](${badge})](${renderLicenseLink(license)})`;
  };
}
function renderLicenseBadge ( license ) { let badge = '' ; switch ( license ) { case 'MIT' : badge = 'https://img.shields.io/badge/license-MIT-red.svg' ; break ; case 'APACHE 2.0' : badge = 'https://img.shields.io/badge/license-Apache_2.0-blue.svg' ; break ; case 'GPL 3.0' : badge = "https://img.shields.io/badge/license-GPLv3-brightgreen.svg" ; break ; case 'BSD 3' : badge = "https://img.shields.io/badge/license-BSD_3--Clause-blueviolet.svg" ; break ; case 'None' : badge = '' ; } ; if ( badge === '' ) { return ` ` ; } else { return ` ${ badge } ${ renderLicenseLink ( license ) } ` ; } ; }
If there is no license, return an empty string
If there is no license return an empty string
// creates variable to use for each badge link in switch case // case for each potential license prompted to the user // var for badge link // logic to return the badge link after the switch case is decided