Skip to content

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

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

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
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy