new Options(commandName, commandDescription, cliopt)
Arguments:
-
commandName -
commandDescription -
[cli='ub'](String) An executable used to execute a commandcommandName. For example:ubcli
Methods
add(otherOptions) → Options
Add a option(s) definition.
Arguments:
parse(defaultsopt, errorsopt)
Parse a command line & env variables for a options and create a configuration object.
Return undefined in case options is not valid or a object with keys - options.long & values
Arguments:
-
[defaults] (Object)  Override for a command line attributes. If any - this one will be used
-
[errors] (Array)  If passed will bw filled by a errors in passed parameters
parseVerbose(defaultsopt, outputParsedopt)
In case -help or '-?' command line switch found or passed options not match a options set
will output a usage help to console and return undefined, else - return a parsed options
Arguments:
-
[defaults] (Object)  Override passed parameter values by this one
-
[outputParsed=false] (Boolean)  output a parsed parameters to a log
usage()
Output a usage info to console
undefined in case options is not valid or a object with keys - options.long & values
[defaults] (Object)  Override for a command line attributes. If any - this one will be used
[errors] (Array)  If passed will bw filled by a errors in passed parameters
-help or '-?' command line switch found or passed options not match a options set
will output a usage help to console and return undefined, else - return a parsed options
[defaults] (Object)  Override passed parameter values by this one
[outputParsed=false] (Boolean)  output a parsed parameters to a log