{"library":"eventsource-client","type":"library","category":null,"description":"eventsource-client is a modern, streaming client for Server-Sent Events (SSE) that operates across both Node.js and browser environments. The package is currently at version 1.2.0 and maintains an active release cadence, with multiple minor updates and bug fixes released throughout the year. It distinguishes itself from traditional EventSource polyfills by not aiming for API compatibility with the browser's native EventSource API. Instead, it offers a more flexible and robust approach, leveraging modern web APIs like `fetch()` and Web Streams. Key differentiators include support for async iterator patterns, various HTTP request methods (POST, PATCH, DELETE), custom headers, request bodies, configurable reconnection policies, and the ability to subscribe to any event name, including the `error` event, along with setting an initial `Last-Event-ID`. The library ships with both ESM and CommonJS versions for broad compatibility.","language":"javascript","status":"active","version":"1.2.0","tags":["javascript","sse","eventsource","server-sent-events","typescript"],"last_verified":"Wed May 27","install":[{"cmd":"npm install eventsource-client","imports":["import { createEventSource } from 'eventsource-client'","import type { EventSourceClientOptions } from 'eventsource-client'","import type { EventSourceMessage } from 'eventsource-client'"]},{"cmd":"yarn add eventsource-client","imports":[]},{"cmd":"pnpm add eventsource-client","imports":[]}],"homepage":null,"github":"https://github.com/rexxars/eventsource-client","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/eventsource-client","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/eventsource-client/compatibility"}}