-
Notifications
You must be signed in to change notification settings - Fork 14
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
Added type to options object #7
Conversation
The option object now supports a type key/value, the application will throw an error when an unsupported type is requested. See qrencode -help for supported types.
@@ -1,7 +1,7 @@ | |||
{ | |||
"name": "qr", | |||
"description": "A small library to generate QR codes with libqrencode.", | |||
"version": "0.2.0", | |||
"version": "0.2.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's best practice to not change this in pull requests, and let the maintainer update this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, I'll revert that change
As per https://github.com/freewil suggestion if no type option is passed the -t flag and parameter will not be passed to qrencode process
@freewil thanks for reviewing my changes so quickly! |
|
||
|
||
// Remove type if the option has not been passed | ||
if(self.types.indexOf(cmd_options.type) === -1){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should probably make this cmd_options.type.toUpperCase()
so the user can pass in 'svg', etc.
Tests for changes to the default object, tests that a toUpperCase string exists in the allowed types.
Thanks guys -- republished as v2.1. |
The option object now supports a type key/value, the application will throw an error when an unsupported type is requested.
See qrencode -help for supported types.