mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-02 08:07:50 +00:00
13 lines
487 B
JavaScript
13 lines
487 B
JavaScript
import freeGlobal from './freeGlobal.js'
|
|
|
|
/** Detect free variable `globalThis` */
|
|
const freeGlobalThis = typeof globalThis == 'object' && globalThis !== null && globalThis.Object == Object && globalThis
|
|
|
|
/** Detect free variable `self`. */
|
|
const freeSelf = typeof self == 'object' && self !== null && self.Object === Object && self
|
|
|
|
/** Used as a reference to the global object. */
|
|
const root = freeGlobalThis || freeGlobal || freeSelf || Function('return this')()
|
|
|
|
export default root
|