eventsource-parser
npmv4.1.0TypeScriptStreaming, source-agnostic EventSource/Server-Sent Events parser
Safe to adopt
Yes — eventsource-parser scores well across adoption, maintenance, weight, supply chain, and licensing. No download data reported for this package yet. Last published 20 days ago. 13 releases in the last 2 years.
- ?Adoption: grade ?, Not reported by this registry.
No download data reported for this package yet.
- AMaintenance: grade A, Excellent.
Last published 20 days ago. 13 releases in the last 2 years.
- AWeight: grade A, Excellent.
Zero runtime dependencies, about 94 KB installed.
- BSupply chain: grade B, Good.
This package has a single maintainer (bus factor of 1).
- ALicense: grade A, Excellent.
MIT — permissive, with no copyleft found in the dependency tree.
Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.
Install cost
What you actually take on by adding eventsource-parser to a project.
Runtime packages this one declares itself.
Distinct packages in the full runtime tree, deduplicated the way a package manager would.
Unpacked size of this package plus its entire runtime tree.
Longest resolved dependency chain below this package.
Compatibility
- Node.js
- node >=22.12
- Module format
- ESM only
- TypeScript
- Types included
- Install scripts
- None
Quick start
A usage example from the eventsource-parser README.
import {createParser, type EventSourceMessage} from 'eventsource-parser'
function onEvent(event: EventSourceMessage) {
console.log('Received event!')
console.log('id: %s', event.id || '<none>')
console.log('event: %s', event.event || '<none>')
console.log('data: %s', event.data)
}
const parser = createParser({onEvent})
const sseStream = getSomeReadableStream()
for await (const chunk of sseStream) {
parser.feed(chunk)eventsource-parser vs the alternatives
Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.
| Package | Weekly downloads | Dependents | License | Last release |
|---|---|---|---|---|
| eventsource-parserthis page | 0 | 3 | MIT | 20 days ago |
| eventsource | 0 | 3 | MIT | 1 day ago |
Dependencies
Declared by eventsource-parser v4.1.0. Runtime dependencies are installed with the package; dev dependencies are not.
Dev (12)
Used by
Popular packages that depend on eventsource-parser.
Model Context Protocol implementation for TypeScript
WhatWG/W3C compliant EventSource client for Node.js and browsers
Model Context Protocol implementation for TypeScript - Client package
Relationship graph
Dependencies (left) and dependents (right) of eventsource-parser.
Frequently installed together
TypeScript definitions for node
TypeScript-first schema declaration and validation library with static type inference
An AST-based pattern checker for JavaScript.
Prettier is an opinionated code formatter
Next generation testing framework powered by Vite
A high-level API to automate web browsers
TypeScript Execute (tsx): Node.js enhanced with esbuild to run TypeScript & ESM files
An extremely fast JavaScript and CSS bundler and minifier.
An HTTP/1.1 client, written from scratch for Node.js
Cross platform child_process#spawn and child_process#spawnSync
JWA, JWS, JWE, JWT, JWK, JWKS for Node.js, Browser, Cloudflare Workers, Deno, Bun, and other Web-interoperable runtimes
Generate or verify a Proof Key for Code Exchange (PKCE) challenge pair
Release history
11 releases in the last two years, typically about 49 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 4.1.0latest | 20 days ago | 94 KB | MIT |
| 4.0.0 | 1 month ago | 91 KB | MIT |
| 3.1.1 | 1 month ago | 121 KB | MIT |
| 3.1.0 | 3 months ago | 120 KB | MIT |
| 3.0.8 | 4 months ago | 106 KB | MIT |
| 3.0.7 | 4 months ago | 101 KB | MIT |
| 3.0.6 | 1 year ago | 75 KB | MIT |
| 3.0.5 | 1 year ago | 75 KB | MIT |
| 3.0.3 | 1 year ago | 73 KB | MIT |
| 3.0.2 | 1 year ago | 231 KB | MIT |
| 3.0.1 | 1 year ago | 244 KB | MIT |
| 3.0.0 | 1 year ago | 241 KB | MIT |
| 3.0.0-beta.0 | 1 year ago | 241 KB | MIT |
| 2.0.1 | 2 years ago | 209 KB | MIT |
| 2.0.0 | 2 years ago | 209 KB | MIT |
Overview
eventsource-parser is an npm package that streaming, source-agnostic EventSource/Server-Sent Events parser. It has 3 known dependents in the graph. The latest version is 4.1.0, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need streaming, source-agnostic EventSource/Server-Sent Events parser and value a focused solution.
When not to use it
Consider an alternative if you need to or if a more actively-maintained option better fits your npm stack.
Pros
- Ships TypeScript type definitions.
- Clear open-source license (MIT).
Cons
- No significant drawbacks detected from available metadata.
Auto-generated from collected registry metadata. No external claims are inferred.
Maintainers
Keywords
Frequently asked questions
Should I use eventsource-parser?
Yes — eventsource-parser scores well across adoption, maintenance, weight, supply chain, and licensing. No download data reported for this package yet. Last published 20 days ago. 13 releases in the last 2 years.
How do I install eventsource-parser?
Run `npm install eventsource-parser` to add eventsource-parser to your npm project.
What license is eventsource-parser released under?
eventsource-parser is distributed under the MIT license.
How popular is eventsource-parser?
npm does not publish download counts. Within PackageGraph's crawl, 3 known packages depend on eventsource-parser.
Is eventsource-parser still maintained?
The most recent release of eventsource-parser (v4.1.0) was published 20 days ago.
Does eventsource-parser run install scripts?
No. eventsource-parser does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.