Sha256: d319160eb8a310c6d6e717353e94b54f75d1afb65bf0af42179ca716a904c808

Contents?: true

Size: 509 Bytes

Versions: 11

Compression:

Stored size: 509 Bytes

Contents

var g;

// This works in non-strict mode
g = (function() {
	return this;
})();

try {
	// This works if eval is allowed (see CSP)
	g = g || Function("return this")() || (1,eval)("this");
} catch(e) {
	// This works if the window reference is available
	if(typeof window === "object")
		g = window;
}

// g can still be undefined, but nothing to do about it...
// We return undefined, instead of nothing here, so it's
// easier to handle this case. if(!global) { ...}

module.exports = g;

Version data entries

11 entries across 7 versions & 4 rubygems

Version Path
ilog-0.4.1 node_modules/webpack/buildin/global.js
ilog-0.4.0 node_modules/webpack/buildin/global.js
ilog-0.3.3 node_modules/webpack/buildin/global.js
optimacms-0.4.3 spec/dummy/node_modules/@rails/webpacker/node_modules/webpack/buildin/global.js
optimacms-0.4.3 spec/dummy/node_modules/@rails/webpacker/node_modules/webpack/node_modules/webpack/buildin/global.js
optimacms-0.4.3 spec/dummy/node_modules/webpack/buildin/global.js
optimacms-0.4.2 spec/dummy/node_modules/@rails/webpacker/node_modules/webpack/buildin/global.js
optimacms-0.4.2 spec/dummy/node_modules/@rails/webpacker/node_modules/webpack/node_modules/webpack/buildin/global.js
optimacms-0.4.2 spec/dummy/node_modules/webpack/buildin/global.js
cortex-0.1.3 spec/dummy/node_modules/webpack/buildin/global.js
lanes-0.8.0 node_modules/webpack/buildin/global.js