mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-31 07:17:50 +00:00
16 lines
519 B
JavaScript
16 lines
519 B
JavaScript
import checkGlobal from './_checkGlobal.js';
|
|
|
|
/** Detect free variable `global` from Node.js. */
|
|
var freeGlobal = checkGlobal(typeof global == 'object' && global);
|
|
|
|
/** Detect free variable `self`. */
|
|
var freeSelf = checkGlobal(typeof self == 'object' && self);
|
|
|
|
/** Detect `this` as the global object. */
|
|
var thisGlobal = checkGlobal(typeof this == 'object' && this);
|
|
|
|
/** Used as a reference to the global object. */
|
|
var root = freeGlobal || freeSelf || thisGlobal || Function('return this')();
|
|
|
|
export default root;
|