code: function format (obj) {
    if (!obj || typeof obj !== 'object') {
      throw new TypeError('argument obj is required')
    }
  
    var subtype = obj.subtype
    var suffix = obj.suffix
    var type = obj.type
  
    if (!type || !TYPE_NAME_REGEXP.test(type)) {
      throw new TypeError('invalid type')
    }
  
    if (!subtype || !SUBTYPE_NAME_REGEXP.test(subtype)) {
      throw new TypeError('invalid subtype')
    }
  
    // format as type/subtype
    var string = type + '/' + subtype
  
    // append +suffix
    if (suffix) {
      if (!TYPE_NAME_REGEXP.test(suffix)) {
        throw new TypeError('invalid suffix')
      }
  
      string += '+' + suffix
    }
  
    return string
  }
docs: Format object to media type.
  
  @param {object} obj
  @return {string}
  @public