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
// x.js import minimist from "minimist" import mri from "mri" const OPTIONS = { boolean: [ 'flag' ], array: [ { key: '_', number: true } ] } console.log('minimist', minimist(process.argv.slice(2), OPTIONS)) console.log('mri', mri(process.argv.slice(2), OPTIONS))
$ node x.js 10 20 xx 40 minimist { _: [ 10, 20, 'xx', 40 ], flag: false } mri { _: [ '10', '20', 'xx', '40' ] }
$ node x.js --flag 10 20 xx 40 minimist { _: [ 10, 20, 'xx', 40 ], flag: true } mri { _: [ 10, '20', 'xx', '40' ], flag: true }
$ node x.js 10 --flag 20 xx 40 minimist { _: [ 10, 20, 'xx', 40 ], flag: true } mri { _: [ '10', 20, 'xx', '40' ], flag: true }
It appears mri converts a single argument after a flag to number. I would expect it to convert all (like minimist) or none.
mri
The text was updated successfully, but these errors were encountered:
No branches or pull requests
It appears
mri
converts a single argument after a flag to number. I would expect it to convert all (like minimist) or none.The text was updated successfully, but these errors were encountered: