Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Generated on Jun 2, 2024 via pnpm

eventsource 2.0.2

W3C compliant EventSource client for Node.js and browser (polyfill)
Package summary
Share
0
issues
1
license
1
MIT
Package created
8 Feb 2012
Version published
12 May 2022
Maintainers
2
Total deps
1
Direct deps
0
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
eventsource@2.0.2
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of eventsource 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does eventsource do?

EventSource is an npm package that provides a pure JavaScript implementation of the EventSource client. It is W3C compliant and allows developers to use it with Node.js or as a browser polyfill for browsers that lack native EventSource support. Its purpose is to facilitate Server-Sent Events (SSE), which allow updates to be pushed from servers to clients.

How do you use eventsource?

To use EventSource, first, install it using the npm package manager with the command: npm install eventsource. Once installed, you can utilize it in your code. For example, if you're setting HTTP request headers, you can do this:

var eventSourceInitDict = {headers: {'Cookie': 'test=test'}};
var es = new EventSource(url, eventSourceInitDict);

Or, for letting unauthorized HTTPS requests:

var eventSourceInitDict = {https: {rejectUnauthorized: false}};
var es = new EventSource(url, eventSourceInitDict);

HTTP/HTTPS proxies can also be defined:

var es = new EventSource(url, {proxy: 'http://your.proxy.com'});

Additionally, there are examples included in the repository that can be started with Node and accessed via your browser at http://localhost:8080 for further usage comprehension.

Where are the eventsource docs?

The primary documentation for the EventSource package is available within its GitHub repository: https://github.com/EventSource/eventsource. Here, you will find everything from installation instructions to examples of usage and API information. The API aims to be W3C compatible and the package is a JavaScript implementation of the client described on the EventSource page of the WHATWG HTML Living Standard, which can serve as supplementary documentation.