We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Install command-line-args.
$ npm install command-line-args
Example script (save it as index.mjs). This example loads the command-line-args ECM distribution.
index.mjs
import commandLineArgs from './node_modules/command-line-args/dist/index.mjs' const optionDefinitions = [ { name: 'verbose', type: Boolean } ] const options = commandLineArgs(optionDefinitions) console.log(options)
Run the script.
$ node --experimental-modules index.mjs --verbose { verbose: true }