node-getopt icon indicating copy to clipboard operation
node-getopt copied to clipboard

Featured command line options parser.

Results 11 node-getopt issues
Sort by recently updated
recently updated
newest added

Build complains about (node:24) [DEP0128] DeprecationWarning: Invalid 'main' field in '/home/container/node_modules/node-getopt/package.json' of './lib'. Please either fix that or report it to the module author

There is a bad value in the `package.json` file that causes the application to print an error message at every start: ``` (node:8) [DEP0128] DeprecationWarning: Invalid 'main' field in '/usr/local/lib/node_modules/@alo5/availability/node_modules/node-getopt/package.json'...

Currently this library does not have good error messages by default. For example, the example program: ```js const getopt = require('node-getopt'); const info = getopt.create([ ['t', 'test=ARG', 'Test'] ]).bindHelp().parseSystem(); ```...

It would be helpful if I could access the command-name (the basename of `process.argv[1]`) from the opts structure, so I can use it in other error messages. Something like: ```...

The help message that's autogenerated from the options is of the form ``` Usage: node myprog [OPTION] Options: -v, --verbose Verbose mode [etc.] ``` But often the usage of myprog...

1) Ability to make options required: Example: the --tel option is required (not just the argument) myapp.js --tel=555-555-1234 2) Also required ARGs should remove 1st = and alltrim(spaces) of argument...

Best I can tell there is no way to specify that a short option should have an argument. I've tried the following: This errors: ``` opts = getopt.create([ ["d=ARG"] }).parseSystem();...