Socket
Socket
Sign inDemoInstall

eventsource

Package Overview
Dependencies
4
Maintainers
2
Versions
35
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.2.2 to 0.2.3

HISTORY.md

2

CONTRIBUTING.md

@@ -7,3 +7,3 @@ # Contributing to EventSource

Update `History.md`, Then:
Update `HISTORY.md`, Then:

@@ -10,0 +10,0 @@ npm outdated --depth 0 # See if you can upgrade something

@@ -8,6 +8,2 @@ var original = require('original')

function isPlainObject(obj) {
return Object.getPrototypeOf(obj) === Object.prototype;
}
/**

@@ -58,3 +54,3 @@ * Creates a new EventSource object

var lastEventId = '';
if (eventSourceInitDict && eventSourceInitDict.headers && isPlainObject(eventSourceInitDict.headers) && eventSourceInitDict.headers['Last-Event-ID']) {
if (eventSourceInitDict && eventSourceInitDict.headers && eventSourceInitDict.headers['Last-Event-ID']) {
lastEventId = eventSourceInitDict.headers['Last-Event-ID'];

@@ -76,3 +72,3 @@ delete eventSourceInitDict.headers['Last-Event-ID'];

if (lastEventId) options.headers['Last-Event-ID'] = lastEventId;
if (eventSourceInitDict && eventSourceInitDict.headers && isPlainObject(eventSourceInitDict.headers)) {
if (eventSourceInitDict && eventSourceInitDict.headers) {
for (var i in eventSourceInitDict.headers) {

@@ -120,4 +116,13 @@ var header = eventSourceInitDict.headers[i];

readyState = EventSource.OPEN;
res.on('close', onConnectionClosed);
res.on('end', onConnectionClosed);
res.on('close', function() {
res.removeAllListeners('close');
res.removeAllListeners('end');
onConnectionClosed();
});
res.on('end', function() {
res.removeAllListeners('close');
res.removeAllListeners('end');
onConnectionClosed();
});
_emit('open', new Event('open'));

@@ -124,0 +129,0 @@

{
"name": "eventsource",
"version": "0.2.2",
"version": "0.2.3",
"description": "W3C compliant EventSource client for Node.js and browser (polyfill)",

@@ -12,10 +12,10 @@ "keywords": [

],
"homepage": "http://github.com/aslakhellesoy/eventsource",
"homepage": "http://github.com/EventSource/eventsource",
"author": "Aslak Hellesøy <aslak.hellesoy@gmail.com>",
"repository": {
"type": "git",
"url": "git://github.com/aslakhellesoy/eventsource.git"
"url": "git://github.com/EventSource/eventsource.git"
},
"bugs": {
"url": "http://github.com/aslakhellesoy/eventsource/issues"
"url": "http://github.com/EventSource/eventsource/issues"
},

@@ -30,3 +30,3 @@ "directories": {

"type": "MIT",
"url": "http://github.com/aslakhellesoy/eventsource/raw/master/LICENSE"
"url": "http://github.com/EventSource/eventsource/raw/master/LICENSE"
}

@@ -36,6 +36,6 @@ ],

"express": "^4.13.4",
"mocha": "^2.4.5",
"mocha": "^3.2.0",
"serve-static": "^1.10.2",
"sse": "^0.0.6",
"webpack": "^1.12.14"
"webpack": "^2.4.1"
},

@@ -42,0 +42,0 @@ "scripts": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc