index.js
function extension (type) {
  if (!type || typeof type !== 'string') {
    return false
  }

  // TODO: use media-typer
  var match = EXTRACT_TYPE_REGEXP.exec(type)

  // get extensions
  var exts = match && exports.extensions[match[1].toLowerCase()]

  if (!exts || !exts.length) {
    return false
  }

  return exts[0]
}
function extension (type) {
  if (!type || typeof type !== 'string') {
    return false
  }

  // TODO: use media-typer
  var match = EXTRACT_TYPE_REGEXP.exec(type)

  // get extensions
  var exts = match && exports.extensions[match[1].toLowerCase()]

  if (!exts || !exts.length) {
    return false
  }

  return exts[0]
}
function extension ( type ) { if ( ! type || typeof type !== 'string' ) { return false } // TODO: use media-typer var match = EXTRACT_TYPE_REGEXP . exec ( type ) // get extensions var exts = match && exports . extensions [ match [ 1 ] . toLowerCase ( ) ] if ( ! exts || ! exts . length ) { return false } return exts [ 0 ] }
Get the default extension for a MIME type.

@param {string} type
@return {boolean|string}
Get the default extension for a MIME type .