We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
If true, parsing will stop at the first unknown argument and the remaining arguments returned in _unknown.
true
_unknown
const commandLineArgs = require('command-line-args') const optionDefinitions = [ { name: 'app' } ] const options = commandLineArgs(optionDefinitions, { stopAtFirstUnknown: true }) console.log(options)
Running this script creates the following output.
$ node example.js --app example -m merge --squash -m My commit message { _unknown: [ 'merge', '--squash', '-m', 'My', 'commit', 'message' ], app: 'example' }