main
Last change
on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago |
Update repo after prototype presentation
|
-
Property mode
set to
100644
|
File size:
459 bytes
|
Rev | Line | |
---|
[d565449] | 1 | // Returns global object of a current environment.
|
---|
| 2 | export default (() => {
|
---|
| 3 | if (typeof global !== 'undefined' && global.Math === Math) {
|
---|
| 4 | return global;
|
---|
| 5 | }
|
---|
| 6 |
|
---|
| 7 | if (typeof self !== 'undefined' && self.Math === Math) {
|
---|
| 8 | return self;
|
---|
| 9 | }
|
---|
| 10 |
|
---|
| 11 | if (typeof window !== 'undefined' && window.Math === Math) {
|
---|
| 12 | return window;
|
---|
| 13 | }
|
---|
| 14 |
|
---|
| 15 | // eslint-disable-next-line no-new-func
|
---|
| 16 | return Function('return this')();
|
---|
| 17 | })();
|
---|
Note:
See
TracBrowser
for help on using the repository browser.