Closed
Description
I have touched on this in a few different issues. Opening a separate issue to make this visible and separately identified as a suggestion (and discussion). Note: I used the proposed behaviour in all the examples in #38.
I do not think storing an explicit undefined
in values
when flags are parsed is adding any value (pun intended).
const { parseArgs } = require('@pkgjs/parseargs');
const parsed = parseArgs(['--foo']);
console.log(parsed);
Current behaviour:
{ flags: { foo: true }, values: { foo: undefined }, positionals: [] }
Proposed behaviour:
{ flags: { foo: true }, values: {}, positionals: [] }