diff options
author | Nayeem Rahman <nayeemrmn99@gmail.com> | 2020-06-12 20:23:38 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-12 15:23:38 -0400 |
commit | 1fff6f55c3ba98a10018c6d374795e612061e9b6 (patch) | |
tree | 12074b6d44736b11513d857e437f9e30a6bf65a4 /std/node/process.ts | |
parent | 26bf56afdaf16634ffbaa23684faf3a44cc10f62 (diff) |
refactor: Don't destructure the Deno namespace (#6268)
Diffstat (limited to 'std/node/process.ts')
-rw-r--r-- | std/node/process.ts | 32 |
1 files changed, 11 insertions, 21 deletions
diff --git a/std/node/process.ts b/std/node/process.ts index 9da41b45b..cad72a00a 100644 --- a/std/node/process.ts +++ b/std/node/process.ts @@ -1,32 +1,22 @@ import { notImplemented } from "./_utils.ts"; -const version = `v${Deno.version.deno}`; - -const versions = { - node: Deno.version.deno, - ...Deno.version, -}; - -const platform = Deno.build.os === "windows" ? "win32" : Deno.build.os; - -const { arch } = Deno.build; - -const { pid, cwd, chdir, exit } = Deno; - function on(_event: string, _callback: Function): void { // TODO(rsp): to be implemented notImplemented(); } export const process = { - version, - versions, - platform, - arch, - pid, - cwd, - chdir, - exit, + version: `v${Deno.version.deno}`, + versions: { + node: Deno.version.deno, + ...Deno.version, + }, + platform: Deno.build.os === "windows" ? "win32" : Deno.build.os, + arch: Deno.build.arch, + pid: Deno.pid, + cwd: Deno.cwd, + chdir: Deno.chdir, + exit: Deno.exit, on, get env(): { [index: string]: string } { // using getter to avoid --allow-env unless it's used |