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

Fails to parse decimal number #142

Open
lpatiny opened this issue Jan 29, 2020 · 0 comments
Open

Fails to parse decimal number #142

lpatiny opened this issue Jan 29, 2020 · 0 comments

Comments

@lpatiny
Copy link

lpatiny commented Jan 29, 2020

It seems that if one of the parameter if a number containing a decimal it fails (only if there is a default value for this parameter) and returns the integer value.

const args = require('args');
args.option('abc', 'This is a test', 0.123);
console.log(process.argv);
const parsed = args.parse(process.argv);
console.log(parsed);
node src/test.js --abc 0.01
// returns { a: 0, abc: 0 }
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

No branches or pull requests

1 participant