Skip to content

Unnecessary arrays in result values? #19

Description

@shadowspawn
const { parseArgs } = require('@pkgjs/parseargs');
const options = {
    withValue: ['foo']
};
const result = parseArgs(undefined, options);
console.log(result.values);

Actual:

 % node withValue.js --flag --foo bar
{ flag: [ undefined ], foo: [ 'bar' ] }

I expect a plain string for foo rather than an array, and no "value" at all for flag.

Expected:

 % node withValue.js --flag --foo bar
{ foo:  'bar'  }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions