0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-03-03 09:31:22 -05:00

std/node: make process global (#4985)

This commit is contained in:
Nikolai Vavilov 2020-04-30 17:00:02 +03:00 committed by GitHub
parent 46bfcbbaa8
commit 84d687e958
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View file

@ -69,7 +69,7 @@ they are stable:
## CommonJS Module Loading
`createRequire(...)` is provided to create a `require` function for loading CJS
modules.
modules. It also sets supported globals.
```ts
import { createRequire } from "https://deno.land/std/node/module.ts";

View file

@ -37,3 +37,10 @@ export const process = {
return [Deno.execPath(), ...Deno.args];
},
};
Object.defineProperty(globalThis, "process", {
value: process,
enumerable: false,
writable: true,
configurable: true,
});