mirror of
https://github.com/denoland/deno.git
synced 2025-08-04 10:59:13 +00:00
feat: Add support for passing a key to Deno.env() (#2952)
This adds a new op to get a single env var.
This commit is contained in:
parent
c920c5f62a
commit
99eec73b4b
7 changed files with 144 additions and 9 deletions
|
@ -63,6 +63,10 @@ impl Worker {
|
|||
"set_env",
|
||||
state_.cli_op(json_op(state_.stateful_op(os::op_set_env))),
|
||||
);
|
||||
i.register_op(
|
||||
"get_env",
|
||||
state_.cli_op(json_op(state_.stateful_op(os::op_get_env))),
|
||||
);
|
||||
i.register_op(
|
||||
"home_dir",
|
||||
state_.cli_op(json_op(state_.stateful_op(os::op_home_dir))),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue