global (value)
For compatibility with Node.js scripts, the global object is accessible via the global variable named "global".
Example
process (object)
A process global is provided for rudimentary compatibility with Node.js
scripts. It contains a subset of the properties found on the Node.js
process global, which each forward to their corresponding yavascript API.
For instance, process.env is a getter that returns env, and
process.argv is a getter that returns scriptArgs.
If you are writing yavascript-specific code, you should use yavascript's APIs
instead of process.
Example
};
[key: string]: string | undefined;
};
};
process.version (string property)
process.versions (object property)
}
process.versions.node (string property)
process.versions.yavascript (string property)
process.versions.unicode (string property)
process.arch (string property)
process.env (readonly object property)
Same as the global env.
Example
[key: string]: string | undefined;
};
process.argv (readonly property)
Same as the global scriptArgs.
Example
process.argv0 (readonly string property)
Same as scriptArgs[0].
Example
process.execPath (readonly string property)
Shortcut for os.realpath(os.execPath()), using the QuickJS os
module.
Example
process.exitCode (number property)
Uses std.getExitCode() and std.setExitCode() from the QuickJS
std module.
Example
process.exit (method)
Uses std.exit() from the QuickJS std module.
Example