UNPKG

@apideck/portman

Version:

Port OpenAPI Spec to Postman Collection, with contract & variation tests included

15 lines 620 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getJsonContentType = void 0; var getJsonContentType = function (contentTypes) { var contentType; contentType = contentTypes.find(function (cType) { return cType === 'application/json'; }); if (contentType !== undefined) return contentType; contentType = contentTypes.find(function (cType) { return cType.includes('json'); }); if (contentType !== undefined) return contentType; return contentType; }; exports.getJsonContentType = getJsonContentType; //# sourceMappingURL=getJsonContentType.js.map