1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-08 23:28:18 -05:00

std/node: toString for globals (#5013)

This commit is contained in:
Nikolai Vavilov 2020-04-30 20:58:40 +03:00 committed by GitHub
parent 80e2211141
commit 898773d3f8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 0 deletions

View file

@ -1,2 +1,9 @@
Object.defineProperty(globalThis, Symbol.toStringTag, {
value: "global",
writable: false,
enumerable: false,
configurable: true,
});
// @ts-ignore
globalThis["global"] = globalThis;

View file

@ -38,6 +38,13 @@ export const process = {
},
};
Object.defineProperty(process, Symbol.toStringTag, {
enumerable: false,
writable: true,
configurable: false,
value: "process",
});
Object.defineProperty(globalThis, "process", {
value: process,
enumerable: false,