'use strict';

/**
* Test if the global scope is bound to the "global" variable present in Node.js environments. When creating a new function using the `Function(){}` constructor, the execution scope aliased by the `this` variable is the global scope.
*
* @private
* @returns {boolean} boolean indicating if global scope is bound to "global" variable
*/
function globalScope() {
	/* jshint evil:true */ // TODO: eslint
	var fcn = '';
	fcn += 'try {';
	fcn += 'return this === global;';
	fcn += '} catch ( err ) {';
	fcn += 'return false;';
	fcn += '}';
	return (new Function( fcn ))();
} // end FUNCTION globalScope()


// EXPORTS //

module.exports = globalScope();

/* eslint-disable no-new-func */
'use strict';

/**
* Test if the global scope is bound to the "global" variable present in Node.js environments. When creating a new function using the `Function(){}` constructor, the execution scope aliased by the `this` variable is the global scope.
*
* @private
* @returns {boolean} boolean indicating if global scope is bound to "global" variable
*/
function globalScope() {
	var fcn = '';
	fcn += 'try {';
	fcn += 'return this === global;';
	fcn += '} catch ( err ) {';
	fcn += 'return false;';
	fcn += '}';
	return (new Function( fcn ))();
} // end FUNCTION globalScope()


// EXPORTS //

module.exports = globalScope();

Disable no-new-func lint rule and remove TODO
Disable no-new-func lint rule and remove TODO
