{"library":"eventsource","type":"library","category":null,"description":"This package provides a WhatWG/W3C compliant EventSource client, enabling applications to consume Server-Sent Events (SSE) in both Node.js and modern browser environments. The current stable version is 4.1.0, with regular updates and major releases approximately every six months, indicating active maintenance. It aims for a minimal implementation closely adhering to the specification, distinguishing itself from alternatives like `eventsource-client` which offer a more flexible API. It supports Node.js versions 20 and higher, along with a wide range of modern browsers, Deno, and Bun, by leveraging standard web APIs like `fetch`, `ReadableStream`, and `TextDecoder`. The library also provides a mechanism to override the `fetch` implementation, offering greater control in diverse runtime environments. TypeScript types are shipped directly with the package, requiring appropriate `tsconfig.json` setup for correct type inference depending on the target environment.","language":"javascript","status":"active","version":"4.1.0","tags":["javascript","sse","eventsource","server-sent-events","typescript"],"last_verified":"Wed May 27","install":[{"cmd":"npm install eventsource","imports":["import { EventSource } from 'eventsource'","import type { EventSourceFetchInit } from 'eventsource'"]},{"cmd":"yarn add eventsource","imports":[]},{"cmd":"pnpm add eventsource","imports":[]}],"homepage":null,"github":"https://github.com/EventSource/eventsource","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/eventsource","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/compatibility"}}