You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
386 B
JavaScript

"use strict";
/**
* A reference to the global object
*
* @type {object} globalObject
*/
var globalObject;
/* istanbul ignore else */
if (typeof global !== "undefined") {
// Node
globalObject = global;
} else if (typeof window !== "undefined") {
// Browser
globalObject = window;
} else {
// WebWorker
globalObject = self;
}
module.exports = globalObject;