eshala dorost she
This commit is contained in:
+16
@@ -0,0 +1,16 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.WebSocket = void 0;
|
||||
const WebSocket_ = require("ws");
|
||||
const utils_js_1 = require("./utils.js");
|
||||
exports.WebSocket = (() => {
|
||||
try {
|
||||
return (0, utils_js_1.getNativeWebSocket)();
|
||||
}
|
||||
catch {
|
||||
if (WebSocket_.WebSocket)
|
||||
return WebSocket_.WebSocket;
|
||||
return WebSocket_;
|
||||
}
|
||||
})();
|
||||
//# sourceMappingURL=index.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"type":"commonjs"}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.getNativeWebSocket = void 0;
|
||||
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");
|
||||
}
|
||||
exports.getNativeWebSocket = getNativeWebSocket;
|
||||
//# sourceMappingURL=utils.js.map
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
{
|
||||
"name": "isows",
|
||||
"description": "Isomorphic WebSocket",
|
||||
"version": "1.0.7",
|
||||
"browser": "./_esm/native.js",
|
||||
"main": "./_cjs/index.js",
|
||||
"module": "./_esm/index.js",
|
||||
"types": "./_types/native.d.ts",
|
||||
"typings": "./_types/native.d.ts",
|
||||
"sideEffects": false,
|
||||
"files": [
|
||||
"*",
|
||||
"!**/*.tsbuildinfo",
|
||||
"!**/*.test.ts",
|
||||
"!**/*.test.ts.snap",
|
||||
"!**/*.test-d.ts",
|
||||
"!**/*.bench.ts",
|
||||
"!tsconfig.build.json"
|
||||
],
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./_types/native.d.ts",
|
||||
"bun": "./_esm/native.js",
|
||||
"browser": "./_esm/native.js",
|
||||
"deno": "./_esm/native.js",
|
||||
"workerd": "./_esm/native.js",
|
||||
"react-native": "./_esm/native.js",
|
||||
"import": "./_esm/index.js",
|
||||
"default": "./_cjs/index.js"
|
||||
},
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"ws": "*"
|
||||
},
|
||||
"license": "MIT",
|
||||
"repository": "wevm/isows",
|
||||
"authors": [
|
||||
"jxom.eth"
|
||||
],
|
||||
"funding": [
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/wevm"
|
||||
}
|
||||
],
|
||||
"keywords": [
|
||||
"isomorphic",
|
||||
"websocket",
|
||||
"ws",
|
||||
"node",
|
||||
"browser"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user