parser
parser copied to clipboard
Example in README doesn't work
The example in the README was confusing since it starts with:
const CLI = require('cli-args');
Which I assume is vestigial.
Moving past that, trying to just C+P the example from the README, it fails with the following:
TypeError: Cannot read property 'context' of undefined
Here's a runkit notebook showing the error.
Also found out after upgrading from the old cli-flags
package. Solution worked for me:
CLI.parse(process.argv.slice(2), {})