index.mjs 380 B

12345678910111213141516171819
  1. // src/index.ts
  2. var scope = (() => {
  3. let win;
  4. if (typeof window !== "undefined") {
  5. win = window;
  6. } else if (typeof globalThis !== "undefined") {
  7. win = globalThis;
  8. } else if (typeof global !== "undefined") {
  9. win = global;
  10. } else if (typeof self !== "undefined") {
  11. win = self;
  12. } else {
  13. win = {};
  14. }
  15. return win;
  16. })();
  17. export {
  18. scope as global
  19. };