Socket
Socket
Sign inDemoInstall

isows

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

isows - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

4

CHANGELOG.md
# isows
## 1.0.1
## 1.0.2
### Patch Changes
- [`c0c0e87`](https://github.com/wagmi-dev/isows/commit/c0c0e8724407a989da70bfff29cf444ccbf31b84) Thanks [@jxom](https://github.com/jxom)! - Removed `"module"` from `package.json`.
- [`59ccdf9`](https://github.com/wagmi-dev/isows/commit/59ccdf9a45900a5854b010f58bf4a6f11169c23f) Thanks [@jxom](https://github.com/jxom)! - Added `"deno"` conditional export.

@@ -8,0 +10,0 @@

@@ -5,7 +5,7 @@ import { WebSocket as WebSocketNode_ } from "ws";

export const WebSocket = (() => {
try {
return getNativeWebSocket();
} catch {
return WebSocketNode_;
}
try {
return getNativeWebSocket();
} catch {
return WebSocketNode_;
}
})();
{
"name": "isows",
"description": "Isomorphic WebSocket",
"version": "1.0.1",
"type": "module",
"version": "1.0.2",
"browser": "./_esm/native.js",

@@ -7,0 +6,0 @@ "main": "./_cjs/index.js",

export function getNativeWebSocket() {
if (typeof WebSocket !== "undefined") return WebSocket;
if (typeof global.WebSocket !== "undefined") return global.WebSocket;
if (typeof window.WebSocket !== "undefined") return window.WebSocket;
if (typeof self.WebSocket !== "undefined") return self.WebSocket;
throw new Error("`WebSocket` is not supported in this environment");
if (typeof WebSocket !== "undefined") return WebSocket;
if (typeof global.WebSocket !== "undefined") return global.WebSocket;
if (typeof window.WebSocket !== "undefined") return window.WebSocket;
if (typeof self.WebSocket !== "undefined") return self.WebSocket;
throw new Error("`WebSocket` is not supported in this environment");
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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