@storybook/global
Version:
Require global variables
20 lines (19 loc) • 380 B
JavaScript
// src/index.ts
var scope = (() => {
let win;
if (typeof window !== "undefined") {
win = window;
} else if (typeof globalThis !== "undefined") {
win = globalThis;
} else if (typeof global !== "undefined") {
win = global;
} else if (typeof self !== "undefined") {
win = self;
} else {
win = {};
}
return win;
})();
export {
scope as global
};