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 renderLicenseSection(data) {
  const license = data.license;
  let output = '';
  switch (license) {
    case 'MIT':
      output = `
${renderLicenseBadge(license)}
${renderLicenseText(license)}
      `
      break;
    case 'Apache':
      output = `
${renderLicenseBadge(license)}
${renderLicenseText(license)}
      `
      break;
    case 'GPL':
      output = `
${renderLicenseBadge(license)}
${renderLicenseText(license)}
      `
      break;
    case 'None':
      output = '';
      break;
    default:
      output = '';
      console.error('Incorrect License Type')
      break;
  }
  return `
## License
${output}
  `
}
function renderLicenseSection ( data ) { const license = data . license ; let output = '' ; switch ( license ) { case 'MIT' : output = ` ${ renderLicenseBadge ( license ) } ${ renderLicenseText ( license ) } ` break ; case 'Apache' : output = ` ${ renderLicenseBadge ( license ) } ${ renderLicenseText ( license ) } ` break ; case 'GPL' : output = ` ${ renderLicenseBadge ( license ) } ${ renderLicenseText ( license ) } ` break ; case 'None' : output = '' ; break ; default : output = '' ; console . error ( 'Incorrect License Type' ) break ; } return ` ${ output } ` }
If there is no license, return an empty string
If there is no license return an empty string