argue-cli
Node.js CLI arguments parser.
API
expect(...names)
Strict expectation one of given commands.
Returns full variant of expected argument.
expect(
{"install": "i"},
["update", "u"],
"info"
);
read()
Strict reading of argument.
Returns argument.
read();
end()
Strict expectation of end.
end();
strictOptions(flagsNames, optionsNames)
Strict reading of flags and options.
Returns fullname-value pairs object.
strictOptions([
["another"]
"verbose"
], [
{"output": "o"},
["plugins", "p"]
])
strictOptionsEqual(...names)
Strict reading of options with equal sign.
If option is provided without value it will interpreted as true
.
Returns fullname-value pairs object.
strictOptionsEqual(
{"output": "o"},
["plugins", "p"]
"verbose"
)
options(flagsNames, optionsNames)
Unlimited reading of flags and options.
Returns fullname-value pairs object.
options([
["another"]
"verbose"
], [
{"output": "o"},
["plugins", "p"]
])
optionsEqual(...names)
Unlimited reading of options with equal sign.
If option is provided without value it will interpreted as true
.
Returns fullname-value pairs object.
optionsEqual(
{"output": "o"},
["plugins", "p"]
"verbose"
)