Skip to content

Conversation

juergba
Copy link
Contributor

@juergba juergba commented Jul 11, 2019

var args = parse(['--file', 'one', '--nr', '5', '2', '--nr', '4'], {
  array: [{ key: 'nr', number: true }],
  configObjects: [{nr: ['1','2','3']}],
  configuration: {
    'combine-arrays': true,
    'flatten-duplicate-arrays': false
  }
})     // { _: [], file: 'one', nr: [ NaN, 4, NaN ] }

The result is incorrect, it should be: { _: [], file: 'one', nr: [ [ 5, 2 ], [ 4 ], [ 1, 2, 3 ] ] }

@juergba juergba force-pushed the issue/number-array branch from a8eb70b to 95ff7d3 Compare July 12, 2019 07:02
@juergba juergba marked this pull request as ready for review July 12, 2019 08:17
@bcoe bcoe merged commit 31c204b into yargs:master Jul 13, 2019
@juergba juergba deleted the issue/number-array branch July 14, 2019 06:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants