Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

iso-websocket

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

iso-websocket - npm Package Compare versions

Comparing version 0.1.6 to 0.2.0

2

dist/src/index.d.ts

@@ -31,3 +31,3 @@ /**

*/
set binaryType(arg: BinaryType);
set binaryType(type: BinaryType);
get binaryType(): BinaryType;

@@ -34,0 +34,0 @@ /**

{
"name": "iso-websocket",
"type": "module",
"version": "0.1.6",
"version": "0.2.0",
"description": "Isomorphic, resilient and extensible Websocket.",

@@ -38,16 +38,16 @@ "author": "Hugo Dias <hugomrdias@gmail.com> (hugodias.me)",

"retry": "^0.13.1",
"typescript-event-target": "^1.1.0"
"typescript-event-target": "^1.1.0",
"unws": "^0.2.4",
"ws": "^8.16.0"
},
"devDependencies": {
"@types/debug": "^4.1.10",
"@types/node": "^20.8.10",
"@types/retry": "^0.12.4",
"@types/ws": "^8.5.8",
"@types/debug": "^4.1.12",
"@types/node": "^20.11.15",
"@types/retry": "^0.12.5",
"@types/ws": "^8.5.10",
"delay": "^6.0.0",
"p-defer": "^4.0.0",
"playwright-test": "^12.4.3",
"type-fest": "^4.6.0",
"typescript": "5.2.2",
"unws": "^0.2.4",
"ws": "^8.14.2"
"playwright-test": "^14.1.0",
"type-fest": "^4.10.2",
"typescript": "5.3.3"
},

@@ -54,0 +54,0 @@ "publishConfig": {

import { TypedEventTarget } from 'typescript-event-target'
import debug from 'debug'
import { WebSocket } from 'unws'
import * as retry from 'retry'

@@ -57,3 +58,3 @@ import {

if (!options.ws && typeof WebSocket === 'undefined') {
if (!options.ws && WebSocket === undefined) {
throw new TypeError('No WebSocket implementation found.')

@@ -204,3 +205,12 @@ }

#getUrl() {
return typeof this.#url === 'function' ? this.#url() : this.#url
const url = new URL(
typeof this.#url === 'function' ? this.#url() : this.#url
)
if (url.protocol === 'http:') {
url.protocol = 'ws:'
}
if (url.protocol === 'https:') {
url.protocol = 'wss:'
}
return url.toString()
}

@@ -207,0 +217,0 @@

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