Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/deno/cli/js/os.ts

A modern runtime for JavaScript and TypeScript.
Go to Latest
import * as deno from "https://deno.land/x/deno@v0.28.0/cli/js/os.ts";

Functions

Returns the user and platform specific directories. Requires the --allow-env flag. Returns null if there is no applicable directory or if any other error occurs.

Returns a snapshot of the environment variables at invocation. Mutating a property in the object will set that variable in the environment for the process. The environment object will only accept strings as values.

Returns the path to the current deno executable. Requires the --allow-env flag.

Exit the Deno process with optional exit code.

Get the hostname. Requires the --allow-env flag.

Check if running in terminal.