1 | import checkGlobal from './_checkGlobal';
|
2 |
|
3 |
|
4 | var objectTypes = {
|
5 | 'function': true,
|
6 | 'object': true
|
7 | };
|
8 |
|
9 |
|
10 | var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType)
|
11 | ? exports
|
12 | : undefined;
|
13 |
|
14 |
|
15 | var freeModule = (objectTypes[typeof module] && module && !module.nodeType)
|
16 | ? module
|
17 | : undefined;
|
18 |
|
19 |
|
20 | var freeGlobal = checkGlobal(freeExports && freeModule && typeof global == 'object' && global);
|
21 |
|
22 |
|
23 | var freeSelf = checkGlobal(objectTypes[typeof self] && self);
|
24 |
|
25 |
|
26 | var freeWindow = checkGlobal(objectTypes[typeof window] && window);
|
27 |
|
28 |
|
29 | var thisGlobal = checkGlobal(objectTypes[typeof this] && this);
|
30 |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 |
|
36 |
|
37 | var root = freeGlobal ||
|
38 | ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) ||
|
39 | freeSelf || thisGlobal || Function('return this')();
|
40 |
|
41 | export default root;
|