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:
Jed Fox 2019-10-02 11:55:28 -04:00 committed by Ryan Dahl
parent c920c5f62a
commit 99eec73b4b
7 changed files with 144 additions and 9 deletions

View file

@ -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))),