Skip to content
velt/os exports

velt/os

API reference

Facts about the machine, a subset of Node's os module. For a walkthrough, read the guide.

import { platform } from "velt/os";

Exports

Re-exported from velt/os/machine

function arch(): string

"arm64" or "x64" (Node's process.arch names).

function

availableParallelism

#std/os/machine.vlt:23

Re-exported from velt/os/machine

function availableParallelism(): i64

Logical CPUs this process may use (at least 1).

Re-exported from velt/os/machine

function eol(): string

The line terminator of the platform: "\r\n" on Windows, "\n" elsewhere.

function

hostname

#std/os/machine.vlt:33

Re-exported from velt/os/machine

function hostname(): string

The machine's host name ("" if unknown).

function

platform

#std/os/machine.vlt:13

Re-exported from velt/os/machine

function platform(): string

"darwin", "linux" or "win32" (Node's process.platform names).

Re-exported from velt/os/machine

function tmpdir(): string

The directory for temporary files, without a trailing separator.

re-export

lastOsError

#
export { lastOsError } from "velt/os/rt"