2022-08-26 10:39:05 -04:00
|
|
|
exports.globalThis = globalThis;
|
|
|
|
exports.global = global;
|
2022-10-21 11:20:18 -04:00
|
|
|
exports.process = process;
|
2023-02-08 19:11:12 -05:00
|
|
|
|
2023-07-19 04:30:04 -04:00
|
|
|
exports.deleteSetTimeout = function () {
|
|
|
|
delete globalThis.setTimeout;
|
2023-02-08 19:11:12 -05:00
|
|
|
};
|
2023-07-19 04:30:04 -04:00
|
|
|
|
|
|
|
exports.getSetTimeout = function () {
|
|
|
|
return globalThis.setTimeout;
|
|
|
|
};
|
|
|
|
|
|
|
|
exports.checkProcessGlobal = function () {
|
|
|
|
console.log("process" in globalThis);
|
|
|
|
console.log(Object.getOwnPropertyDescriptor(globalThis, "process") !== undefined);
|
|
|
|
};
|
|
|
|
|
|
|
|
exports.checkWindowGlobal = function () {
|
|
|
|
console.log("window" in globalThis);
|
|
|
|
console.log(Object.getOwnPropertyDescriptor(globalThis, "window") !== undefined);
|
|
|
|
}
|
|
|
|
|
|
|
|
exports.getFoo = function () {
|
|
|
|
return globalThis.foo;
|
|
|
|
}
|