react-native-qrcode/node_modules/qr.js/index.js

18 lines
386 B
JavaScript
Raw Normal View History

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;