UNPKG

@nestia/sdk

Version:

Nestia SDK and Swagger generator

22 lines 1.04 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.HttpResponseContentTypeUtil = void 0; var HttpResponseContentTypeUtil; (function (HttpResponseContentTypeUtil) { HttpResponseContentTypeUtil.isSupported = (input) => input === null || input === "application/json" || input === "text/plain" || input === "application/x-www-form-urlencoded" || HttpResponseContentTypeUtil.isBinary(input); HttpResponseContentTypeUtil.isBinary = (input) => { if (typeof input !== "string") return false; const value = input.split(";")[0].trim().toLowerCase(); return (value.startsWith("image/") || value.startsWith("video/") || value.startsWith("audio/") || value === "application/octet-stream" || value === "application/pdf"); }; })(HttpResponseContentTypeUtil || (exports.HttpResponseContentTypeUtil = HttpResponseContentTypeUtil = {})); //# sourceMappingURL=HttpResponseContentTypeUtil.js.map