function contentType(str) {
  let mime = str.includes("/") ? str : lookup(str);
  if (!mime) {
    return;
  }
  if (!mime.includes("charset")) {
    const cs = charset(mime);
    if (cs) {
      mime += `; charset=${cs.toLowerCase()}`;
    }
  }
  return mime;
}
/** Given an extension or media type, return the full `Content-Type` header
 * string.  Returns `undefined` if not resolvable.
 */
Given an extension or media type, return the full `Content-Type` header
string.  Returns `undefined` if not resolvable.
Given an extension or media type return the full ` Content - Type ` header string . Returns ` undefined ` if not resolvable .
function contentType(str) {
  let mime = str.includes("/") ? str : lookup(str);
  if (!mime) {
    return;
  }
  if (!mime.includes("charset")) {
    const cs = charset(mime);
    if (cs) {
      mime += `; charset=${cs.toLowerCase()}`;
    }
  }
  return mime;
}
function contentType ( str ) { let mime = str . includes ( "/" ) ? str : lookup ( str ) ; if ( ! mime ) { return ; } if ( ! mime . includes ( "charset" ) ) { const cs = charset ( mime ) ; if ( cs ) { mime += ` ${ cs . toLowerCase ( ) } ` ; } } return mime ; }
Given an extension or media type, return the full `Content-Type` header
 string.
Given an extension or media type return the full ` Content - Type ` header string .