github-pages-deploy-action/node_modules/@sinonjs/commons/lib/global.js

23 lines
386 B
JavaScript
Raw Normal View History

2020-01-28 13:08:03 +08:00
"use strict";
2020-03-22 05:13:25 +08:00
/**
* A reference to the global object
*
* @type {object} globalObject
*/
2020-01-28 13:08:03 +08:00
var globalObject;
2020-03-22 05:13:25 +08:00
2020-01-28 13:08:03 +08:00
/* 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;