doipjs/node_modules/@sinonjs/commons/lib/global.js
Yarmo Mackenbach e996bc8023 Initial commit
2020-10-23 22:35:53 +02:00

22 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;