@lynx-js/lynxtron / CommandLine
CommandLine
Constructors
new CommandLine()
Returns
Methods
appendArgument()
Append an argument to the command line. The argument will be quoted correctly. Switches will precede arguments regardless of appending order.
If you're appending an argument like --switch=value, consider using
appendSwitch('switch', 'value') instead.
[!NOTE] This will not affect process.argv. The intended usage of this
function is to control command-line behavior.
Parameters
Returns
void
Defined in
appendSwitch()
Append a switch (with optional value) to the command line.
[!NOTE] This will not affect process.argv. The intended usage of this
function is to control command-line behavior.
Parameters
Returns
void
Defined in
getSwitchValue()
The command-line switch value.
This function is meant to obtain command-line switches. It is not meant to be
used for application-specific command line arguments. For the latter, please use
process.argv.
When the switch is not present or has no value, it returns empty string.
Parameters
Returns
string
Defined in
hasSwitch()
Whether the command-line switch is present.
Parameters
Returns
boolean
Defined in
removeSwitch()
Removes the specified switch from the command line.
This will not affect process.argv. The intended usage of this
function is to control command-line behavior.
Parameters
Returns
void
Defined in