mirror of
https://github.com/litruv/API-WebSocket-Bridge.git
synced 2026-07-25 03:06:03 +10:00
first commit
This commit is contained in:
13
node_modules/engine.io-client/build/esm/transports/websocket-constructor.browser.js
generated
vendored
Normal file
13
node_modules/engine.io-client/build/esm/transports/websocket-constructor.browser.js
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
import { globalThisShim as globalThis } from "../globalThis.js";
|
||||
export const nextTick = (() => {
|
||||
const isPromiseAvailable = typeof Promise === "function" && typeof Promise.resolve === "function";
|
||||
if (isPromiseAvailable) {
|
||||
return (cb) => Promise.resolve().then(cb);
|
||||
}
|
||||
else {
|
||||
return (cb, setTimeoutFn) => setTimeoutFn(cb, 0);
|
||||
}
|
||||
})();
|
||||
export const WebSocket = globalThis.WebSocket || globalThis.MozWebSocket;
|
||||
export const usingBrowserWebSocket = true;
|
||||
export const defaultBinaryType = "arraybuffer";
|
||||
Reference in New Issue
Block a user