code: function parse (string) {
    if (!string) {
      throw new TypeError('argument string is required')
    }
  
    if (typeof string !== 'string') {
      throw new TypeError('argument string is required to be a string')
    }
  
    var match = TYPE_REGEXP.exec(string.toLowerCase())
  
    if (!match) {
      throw new TypeError('invalid media type')
    }
  
    var type = match[1]
    var subtype = match[2]
    var suffix
  
    // suffix after last +
    var index = subtype.lastIndexOf('+')
    if (index !== -1) {
      suffix = subtype.substr(index + 1)
      subtype = subtype.substr(0, index)
    }
  
    return new MediaType(type, subtype, suffix)
  }
docs: Parse media type to object.
  
  @param {string} string
  @return {object}
  @public