We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Actual:
yargs(['--foo'], {number: ['foo'], default: {foo: 1}}); //=> { _: [], foo: undefined }
Expected:
yargs(['--foo'], {number: ['foo'], default: {foo: 1}}); //=> { _: [], foo: 1 }
Applies to string and number.
string
number
Alternatively, it could throw, since --foo is technically an incorrect value, but that might be too opinionated for yargs-parser.
--foo
yargs-parser
The text was updated successfully, but these errors were encountered:
@sindresorhus please take + [email protected] for a spin, it will now use default values if no right-hand side is provided to option.
+ [email protected]
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Actual:
Expected:
Applies to
string
andnumber
.Alternatively, it could throw, since
--foo
is technically an incorrect value, but that might be too opinionated foryargs-parser
.The text was updated successfully, but these errors were encountered: