{"library":"fetch-event-stream","type":"library","category":null,"description":"fetch-event-stream is a lightweight (741 bytes gzipped) utility designed to parse Server-Sent Events (SSE) from `fetch` responses using the native Web Streams API. It's currently at version 0.1.6 and has a frequent patch release cadence, addressing compatibility and feature enhancements. Unlike the browser's native `EventSource` which is limited to GET requests and lacks custom headers, `fetch-event-stream` allows any HTTP method (e.g., POST for APIs like Anthropic or OpenAI) and supports custom headers and JSON payloads, making it suitable for modern API interactions that often require authentication. It differentiates itself by leveraging native Web Streams without heavy polyfills, ensuring a small bundle size and broad compatibility across browsers, Node.js, Deno, Bun, Cloudflare Workers, and Web/Service Workers. This approach avoids the common pain point of bloated SDKs, such as the `openai` library's larger size due to stream polyfills, offering a more streamlined and performant solution for SSE consumption.","language":"javascript","status":"active","version":"0.1.6","tags":["javascript","SSE","Server-Sent Events","Events","EventSource","typescript"],"last_verified":"Wed May 27","install":[{"cmd":"npm install fetch-event-stream","imports":["import { events } from 'fetch-event-stream';","import { stream } from 'fetch-event-stream';"]},{"cmd":"yarn add fetch-event-stream","imports":[]},{"cmd":"pnpm add fetch-event-stream","imports":[]}],"homepage":null,"github":"https://github.com/lukeed/fetch-event-stream","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/fetch-event-stream","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/fetch-event-stream/compatibility"}}