You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
386 B
22 lines
386 B
"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;
|
|
|