</>PackageGraphPackageGraph

eventsource-parser

npmv4.1.0TypeScript

Streaming, 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.

0
Direct dependencies

Runtime packages this one declares itself.

0
Total installed

Distinct packages in the full runtime tree, deduplicated the way a package manager would.

94 KB
Install size

Unpacked size of this package plus its entire runtime tree.

Tree depth

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)
Example truncated — see the full README.

eventsource-parser vs the alternatives

Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.

PackageWeekly downloadsDependentsLicenseLast release
eventsource-parserthis page03MIT20 days ago
eventsource03MIT1 day ago

Dependencies

Declared by eventsource-parser v4.1.0. Runtime dependencies are installed with the package; dev dependencies are not.

Dev (12)

@changesets/changelog-github ^0.7.0@changesets/cli ^2.31.1@types/node ^22.12.0esbuild ^0.28.2eventsource-encoder ^1.0.2knip ^6.15.0mitata ^1.0.34oxfmt ^0.53.0oxlint ^1.68.0terser ^5.46.2typescript ^7.0.2vitest ^4.1.8

Used by

Popular packages that depend on eventsource-parser.

Relationship graph

Dependencies (left) and dependents (right) of eventsource-parser.

Frequently installed together

Release history

11 releases in the last two years, typically about 49 days apart.

Recent versions of eventsource-parser
VersionPublishedSizeLicense
4.1.0latest20 days ago94 KBMIT
4.0.01 month ago91 KBMIT
3.1.11 month ago121 KBMIT
3.1.03 months ago120 KBMIT
3.0.84 months ago106 KBMIT
3.0.74 months ago101 KBMIT
3.0.61 year ago75 KBMIT
3.0.51 year ago75 KBMIT
3.0.31 year ago73 KBMIT
3.0.21 year ago231 KBMIT
3.0.11 year ago244 KBMIT
3.0.01 year ago241 KBMIT
3.0.0-beta.01 year ago241 KBMIT
2.0.12 years ago209 KBMIT
2.0.02 years ago209 KBMIT

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.