reconnecting-websocket
Advanced tools
Comparing version 3.2.1 to 3.2.2
@@ -13,3 +13,3 @@ interface ReconnectingWebsocket extends WebSocket { | ||
debug?: boolean; | ||
}) => ReconnectingWebsocket; | ||
}) => void; | ||
export = ReconnectingWebsocket; |
@@ -214,4 +214,3 @@ "use strict"; | ||
}; | ||
return this; | ||
}; | ||
module.exports = ReconnectingWebsocket; |
@@ -14,4 +14,4 @@ declare module "index" { | ||
debug?: boolean; | ||
}) => ReconnectingWebsocket; | ||
}) => void; | ||
export = ReconnectingWebsocket; | ||
} |
@@ -215,5 +215,4 @@ define("index", ["require", "exports"], function (require, exports) { | ||
}; | ||
return this; | ||
}; | ||
return ReconnectingWebsocket; | ||
}); |
@@ -250,5 +250,5 @@ /*! | ||
}; | ||
return this as ReconnectingWebsocket; | ||
}; | ||
export = ReconnectingWebsocket; |
{ | ||
"name": "reconnecting-websocket", | ||
"version": "3.2.1", | ||
"version": "3.2.2", | ||
"description": "Reconnecting WebSocket", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -16,3 +16,3 @@ # Reconnecting WebSocket | ||
- Reassign event listeners when a new WebSocket instance is created | ||
- Automatic reconnection using [rfc6455](https://tools.ietf.org/html/rfc6455#section-7.2.3) guidelines | ||
- Automatic reconnection using [RFC 6455](https://tools.ietf.org/html/rfc6455#section-7.2.3) guidelines | ||
- Handle connection timeouts | ||
@@ -127,4 +127,4 @@ - Full test coverage | ||
rws.addEventListener('open', () => { | ||
ws.binaryType = 'arraybuffer'; | ||
ws.send('i am ready to receive some data!'); | ||
rws.binaryType = 'arraybuffer'; | ||
rws.send('i am ready to receive some data!'); | ||
}); | ||
@@ -157,3 +157,3 @@ ``` | ||
const rws = new ReconnectingWebSocket('ws://my.site.com', undefined, {maxRetries: 3}); | ||
ws.onerror = (err) => { | ||
rws.onerror = (err) => { | ||
if (err.code === 'EHOSTDOWN') { | ||
@@ -160,0 +160,0 @@ console.log('server down'); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
34057
691