Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
mpetazzoni authored Nov 8, 2023
2 parents 5471ff1 + 3a40049 commit 67b5225
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
7 changes: 5 additions & 2 deletions lib/sse.js
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,10 @@ var SSE = function (url, options) {
if (typeof exports !== 'undefined') {
exports.SSE = SSE;
}

// Export as an ECMAScript module
export { SSE };

/**
* @typedef { {[key: string]: string} } SSEHeader
*/
Expand All @@ -296,7 +300,6 @@ if (typeof exports !== 'undefined') {
* @property {string} id
* @property {string} data
*/

/**
* @typedef {Object} _ReadyStateEvent
* @property {number} readyState
Expand Down Expand Up @@ -381,4 +384,4 @@ if (typeof exports !== 'undefined') {
* @property {OnReadystatechange} onreadystatechange
* @property {OnError} onerror
* @property {OnAbort} onabort
*/
*/
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"name": "sse.js",
"version": "1.0.0",
"version": "2.0.0",
"description": "A flexible Server-Sent Events source; supports POST requests and custom headers",
"main": "./lib/sse.js",
"type": "module",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"generate-types": "tsc"
Expand Down

0 comments on commit 67b5225

Please sign in to comment.