node: make process global (denoland/deno#4985)

This commit is contained in:
Nikolai Vavilov 2020-04-30 17:00:02 +03:00 committed by denobot
parent fa4dfd38d3
commit 26493ca172
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,
});