/
githubmirror
/
socket.io
Обзор
Документация
Войти
/
githubmirror
/
socket.io
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
packages/engine.io-client/lib/globals.ts
23 строки
593 B
Damien Arrachequesne
refactor: prepare the migration to a monorepo
08 июл 2024, 11:59
Не верифицирован
08 июл 2024, 11:59
32a1a60
Код
Авторство
О чём код?
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 globalThisShim = (() => { if (typeof self !== "undefined") { return self; } else if (typeof window !== "undefined") { return window; } else { return Function("return this")(); } })(); export const defaultBinaryType = "arraybuffer"; export function createCookieJar() {}