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:
parent
46bfcbbaa8
commit
84d687e958
2 changed files with 8 additions and 1 deletions
|
@ -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";
|
||||
|
|
|
@ -37,3 +37,10 @@ export const process = {
|
|||
return [Deno.execPath(), ...Deno.args];
|
||||
},
|
||||
};
|
||||
|
||||
Object.defineProperty(globalThis, "process", {
|
||||
value: process,
|
||||
enumerable: false,
|
||||
writable: true,
|
||||
configurable: true,
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue