Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); function classifyResponseStreaming(res) { if (!res.body) { return { isStreaming: false }; } const contentType = res.headers.get("content-type") ?? ""; const contentLength = res.headers.get("content-length"); if (/^text\/event-stream\b/i.test(contentType) || /^application\/(x-)?ndjson\b/i.test(contentType) || /^application\/stream\+json\b/i.test(contentType) || /^text\/plain\b/i.test(contentType) && !contentLength) { return { isStreaming: true }; } return { isStreaming: false }; } exports.classifyResponseStreaming = classifyResponseStreaming; //# sourceMappingURL=streaming.js.map