2022-08-26 23:39:05 +09:00
|
|
|
exports.globalThis = globalThis;
|
|
|
|
exports.global = global;
|
2022-10-21 11:20:18 -04:00
|
|
|
exports.process = process;
|
2023-02-09 01:11:12 +01:00
|
|
|
|
2023-07-19 10:30:04 +02:00
|
|
|
exports.deleteSetTimeout = function () {
|
|
|
|
delete globalThis.setTimeout;
|
2023-02-09 01:11:12 +01:00
|
|
|
};
|
2023-07-19 10:30:04 +02: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;
|
|
|
|
}
|