Yargs be a node.js library fer hearties tryin' ter parse optstrings.
Yargs helps you build interactive command line tools, by parsing arguments and generating an elegant user interface. It gives you:
my-program.js serve --port=5000
).npm i yargs --save
#!/usr/bin/env nodeconst argv = argv if argvships > 3 && argvdistance < 535 console else console
$ ./plunder.js --ships=4 --distance=22Plunder more riffiwobbles! $ ./plunder.js --ships 12 --distance 98.7Retreat from the xupptumblers!
#!/usr/bin/env nodeconst yargs = // eslint-disable-line argv