function charset(type) {
  const m = EXTRACT_TYPE_REGEXP.exec(type);
  if (!m) {
    return;
  }
  const [match] = m;
  const mime = db[match.toLowerCase()];
  if (mime && mime.charset) {
    return mime.charset;
  }
  if (TEXT_TYPE_REGEXP.test(match)) {
    return "UTF-8";
  }
}
/** Given a media type return any default charset string.  Returns `undefined`
 * if not resolvable.
 */
Given a media type return any default charset string.  Returns `undefined`
if not resolvable.
Given a media type return any default charset string . Returns ` undefined ` if not resolvable .
function charset(type) {
  const m = EXTRACT_TYPE_REGEXP.exec(type);
  if (!m) {
    return;
  }
  const [match] = m;
  const mime = db[match.toLowerCase()];
  if (mime && mime.charset) {
    return mime.charset;
  }
  if (TEXT_TYPE_REGEXP.test(match)) {
    return "UTF-8";
  }
}
function charset ( type ) { const m = EXTRACT_TYPE_REGEXP . exec ( type ) ; if ( ! m ) { return ; } const [ match ] = m ; const mime = db [ match . toLowerCase ( ) ] ; if ( mime && mime . charset ) { return mime . charset ; } if ( TEXT_TYPE_REGEXP . test ( match ) ) { return "UTF-8" ; } }
Given a media type return any default charset string.
Given a media type return any default charset string .