minimistjs / minimist

parse argument options
MIT License
530 stars 30 forks source link

Fix for #9 #10

Closed nhz-io closed 1 year ago

nhz-io commented 1 year ago

To minimize the impact on the rest of the code, i kept the aliases as they are (non-flat, nested). So the fix is only on the flags.string. The fix is future proof if one day aliases become flat.

shadowspawn commented 1 year ago

I prefer expanding the tests to cover this combination rather than adding a specific regression test for the failure. So the test would be named like "opt.string works with multiple aliases" rather than "Issue #9 fixed".

But wait for a second opinion from @ljharb before changing.