"use strict";
exports.__esModule = true;
function matchesMediaType(types, mediaType) {
    return types.some(function (type) {
        return mediaType.indexOf(type) > -1;
    });
}
exports["default"] = {
    formUrlEncoded: function (mimeType) {
        return matchesMediaType(['application/x-www-form-urlencoded'], mimeType);
    },
    json: function (contentType) {
        return matchesMediaType(['application/json', 'application/x-json', 'text/json', 'text/x-json', '+json'], contentType);
    },
    multipart: function (contentType) {
        return matchesMediaType(['multipart/mixed', 'multipart/related', 'multipart/form-data', 'multipart/alternative'], contentType);
    },
    wildcard: function (contentType) {
        return contentType === '*/*';
    },
    xml: function (contentType) {
        return matchesMediaType([
            'application/xml',
            'application/xml-external-parsed-entity',
            'application/xml-dtd',
            'text/xml',
            'text/xml-external-parsed-entity',
            '+xml',
        ], contentType);
    }
};
