New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ng-event-source

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ng-event-source - npm Package Compare versions

Comparing version 1.0.5 to 1.0.6

9

eventsource.js

@@ -154,3 +154,6 @@ /** @license

var heartbeatTimeout = getDuration(options.heartbeatTimeout || 45000, 0);
var checkActivity = true;
if (options && options.checkActivity != null) {
checkActivity = Boolean(options.checkActivity);
}
var lastEventId = "";

@@ -354,7 +357,7 @@ var headers = (options && options.headers) || {};

if ((currentState === OPEN || currentState === CONNECTING) &&
(type === "load" || type === "error" || isWrongStatusCodeOrContentType || (charOffset > 1024 * 1024) || (timeout === 0 && !wasActivity))) {
(type === "load" || type === "error" || isWrongStatusCodeOrContentType || (charOffset > 1024 * 1024) || (timeout === 0 && (!wasActivity || !checkActivity)))) {
if (isWrongStatusCodeOrContentType) {
close();
} else {
if (type === "" && timeout === 0 && !wasActivity) {
if (type === "" && timeout === 0 && (!wasActivity || !checkActivity)) {
setTimeout(function () {

@@ -361,0 +364,0 @@ if (errorOnTimeout) {

{
"name": "ng-event-source",
"version": "1.0.5",
"version": "1.0.6",
"main": "eventsource.js",

@@ -5,0 +5,0 @@ "typings": "typings.d.ts",

declare enum ReadyState {CONNECTING = 0, OPEN = 1, CLOSED = 2}
export class EventSourcePolyfill extends EventTarget {
CONNECTING: ReadyState;
OPEN: ReadyState;
CLOSED: ReadyState;
CONNECTING: ReadyState;
OPEN: ReadyState;
CLOSED: ReadyState;
constructor(url: string, eventSourceInitDict?: EventSourceInit);
url: string;
readyState: ReadyState;
onopen: Function;
onmessage: (event: OnMessageEvent) => void;
onerror: Function;
close: () => void;
constructor(url: string, eventSourceInitDict?: EventSourceInit);
url: string;
readyState: ReadyState;
onopen: Function;
onmessage: (event: OnMessageEvent) => void;
onerror: Function;
close: () => void;
}
interface EventSourceInit {
withCredentials?: boolean;
headers?: Object;
errorOnTimeout?: boolean;
withCredentials?: boolean;
headers?: Object;
errorOnTimeout?: boolean;
heartbeatTimeout?: number;
checkActivity?: boolean;
}
interface OnMessageEvent {
data: string;
data: string;
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc