plinth/node/process

Functions

pub fn argv() -> Array(String)

Returns an array containing the command-line arguments passed when the Node.js process was launched. The first element will be process.execPath. The second element will be the path to the JavaScript file being executed. The remaining elements will be any additional command-line arguments.

pub fn cwd() -> String

Returns the current working directory of the Node.js process.

pub fn exit(code code: Int) -> Nil

instructs Node.js to terminate the process synchronously with an exit status of code. Node.js will not terminate until all the exit event listeners are called.

pub fn hrtime() -> BigInt

returns the current high-resolution real time in nanoseconds as a bigint

Search Document