You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
386 B

2 years ago
var QRCode = require('./lib/QRCode');
var ErrorCorrectLevel = require('./lib/ErrorCorrectLevel');
var qrcode = function(data, opt) {
opt = opt || {};
var qr = new QRCode(opt.typeNumber || -1,
opt.errorCorrectLevel || ErrorCorrectLevel.H);
qr.addData(data);
qr.make();
return qr;
};
qrcode.ErrorCorrectLevel = ErrorCorrectLevel;
module.exports = qrcode;