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

Pass Uint8Array value in qr.addData(value, 'Byte') #73

Open
amaury1093 opened this issue Jul 18, 2019 · 1 comment
Open

Pass Uint8Array value in qr.addData(value, 'Byte') #73

amaury1093 opened this issue Jul 18, 2019 · 1 comment

Comments

@amaury1093
Copy link

amaury1093 commented Jul 18, 2019

https://github.com/kazuhikoarase/qrcode-generator/blob/2000d1d2fb3537e4ca8ffd89fc96ed94e31fdffc/js/README.md#adddatadata-mode--void

data arg seems to be string. Can i pass an Uint8Array? That would bypass this line:

var _bytes = qrcode.stringToBytes(data);

@kazuhikoarase
Copy link
Owner

Hi,
You could pass it by as follows.

qrcode.stringToBytes = function(data) { return data; }; 

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

2 participants