vuestic-ui
Version:
Vue 3 UI Framework
22 lines (21 loc) • 481 B
JavaScript
const isServer = () => typeof window === "undefined";
const isClient = () => !isServer();
const getWindow = () => typeof window === "undefined" ? void 0 : window;
const fakeGlobal = {};
const getGlobal = () => {
if (isServer()) {
if (typeof globalThis === "undefined") {
return fakeGlobal;
}
return globalThis;
} else {
return window;
}
};
export {
getGlobal as a,
isClient as b,
getWindow as g,
isServer as i
};
//# sourceMappingURL=ssr.js.map