bv-ui-core
Advanced tools
Comparing version 0.5.0 to 0.5.1
/** | ||
* @fileOverview Provides a reference to the global object | ||
* | ||
* Functions created via the Function constructor in strict mode are sloppy | ||
* unless the function body contains a strict mode pragma. This is a reliable | ||
* way to obtain a reference to the global object in any ES3+ environment. | ||
* see http://stackoverflow.com/a/3277192/46867 | ||
* the below solution works in ES3+ environment and doesn't violates CSP in Chrome apps | ||
* see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis | ||
*/ | ||
'use strict'; /* eslint strict:0 */ | ||
module.exports = (new Function('return this;'))(); /* eslint no-new-func:0 */ | ||
var getGlobal = function () { | ||
if (typeof globalThis !== 'undefined') { return globalThis; } | ||
if (typeof self !== 'undefined') { return self; } | ||
if (typeof window !== 'undefined') { return window; } | ||
if (typeof global !== 'undefined') { return global; } | ||
throw new Error('unable to locate global object'); | ||
}; | ||
module.exports = getGlobal(); |
{ | ||
"name": "bv-ui-core", | ||
"version": "0.5.0", | ||
"version": "0.5.1", | ||
"license": "Apache 2.0", | ||
@@ -5,0 +5,0 @@ "description": "Bazaarvoice UI-related JavaScript", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1903
85242
57