argue-cli
![Node version](https://img.shields.io/node/v/argue-cli.svg)
Node.js CLI arguments parser.
Install
npm i -S argue-cli
yarn add argue-cli
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"
)
![NPM](https://nodei.co/npm/argue-cli.png?downloads=true&downloadRank=true&stars=true)