mirror of
https://github.com/nodejs/node.git
synced 2025-05-16 13:53:32 +00:00

Closes: https://github.com/nodejs/node/pull/16280 PR-URL: https://github.com/nodejs/node/pull/16509 Fixes: https://github.com/nodejs/node/issues/14161 Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michaël Zasso <targos@protonmail.com>
23 lines
381 B
JavaScript
23 lines
381 B
JavaScript
var QRMode = require('./QRMode');
|
|
|
|
function QR8bitByte(data) {
|
|
this.mode = QRMode.MODE_8BIT_BYTE;
|
|
this.data = data;
|
|
}
|
|
|
|
QR8bitByte.prototype = {
|
|
|
|
getLength : function() {
|
|
return this.data.length;
|
|
},
|
|
|
|
write : function(buffer) {
|
|
for (var i = 0; i < this.data.length; i++) {
|
|
// not JIS ...
|
|
buffer.put(this.data.charCodeAt(i), 8);
|
|
}
|
|
}
|
|
};
|
|
|
|
module.exports = QR8bitByte;
|