-
acceptMoreValues(option) → {boolean}
-
Checks whether or not the given option accept more values.
Parameters:
Name |
Type |
Description |
option |
Object
|
the option |
- Source:
Returns:
if the option accepts more values, otherwise.
-
Type
-
boolean
-
allArguments() → {Array.<string>}
-
- Source:
Returns:
-
cli() → {CLI}
-
- Source:
Returns:
-
getArgumentValue(index) → {Object}
-
Gets the value of an argument with the given index.
Parameters:
Name |
Type |
Description |
index |
number
|
the index |
- Source:
Returns:
the value, null
if not set
-
Type
-
Object
-
getOptionValue(name) → {Object}
-
Gets the value of an option with the matching name (can be the long name, short name or arg name).
Parameters:
Name |
Type |
Description |
name |
string
|
the name |
- Source:
Returns:
the value, null
if not set
-
Type
-
Object
-
getRawValueForArgument(arg) → {string}
-
Gets the raw value of the given argument. Raw values are the values as given in the user command line.
Parameters:
Name |
Type |
Description |
arg |
Object
|
the argument |
- Source:
Returns:
the value, null
if none.
-
Type
-
string
-
getRawValueForOption(option) → {string}
-
Gets the raw value of the given option. Raw values are the values as given in the user command line.
Parameters:
Name |
Type |
Description |
option |
Object
|
the option |
- Source:
Returns:
the value, null
if none.
-
Type
-
string
-
getRawValues(option) → {Array.<string>}
-
Gets the raw values of the given option. Raw values are simple "String", not converted to the option type.
Parameters:
Name |
Type |
Description |
option |
Object
|
the option |
- Source:
Returns:
the list of values, empty if none
-
Type
-
Array.<string>
-
isArgumentAssigned(arg) → {boolean}
-
Checks whether or not the given argument has been assigned in the command line.
Parameters:
Name |
Type |
Description |
arg |
Object
|
the argument |
- Source:
Returns:
true
if the argument has received a value, otherwise.
-
Type
-
boolean
-
isFlagEnabled(name) → {boolean}
-
Gets the value of an option marked as a flag.
Calling this method an a non-flag option throws an IllegalStateException.
Parameters:
Name |
Type |
Description |
name |
string
|
the option name |
- Source:
Returns:
true
if the flag has been set in the command line, false
otherwise.
-
Type
-
boolean
-
isOptionAssigned(option) → {boolean}
-
Checks whether or not the given option has been assigned in the command line.
Parameters:
Name |
Type |
Description |
option |
Object
|
the option |
- Source:
Returns:
true
if the option has received a value, otherwise.
-
Type
-
boolean
-
isSeenInCommandLine(option) → {boolean}
-
check whether or not the given option has been seen in the user command line.
Parameters:
Name |
Type |
Description |
option |
Object
|
the option |
- Source:
Returns:
true
if the user command line has used the option
-
Type
-
boolean