Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: number[] - maybeCoerceNumber(): processing of number typed arrays #187

Merged
merged 3 commits into from
Jul 13, 2019

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