7cdef4bbfc
Co-authored-by: timvisee <tim@visee.me>
10 lines
245 B
JavaScript
10 lines
245 B
JavaScript
const raw = require('choo/html/raw');
|
|
const qrcode = require('../qrcode');
|
|
|
|
module.exports = function(url) {
|
|
const gen = qrcode(5, 'L');
|
|
gen.addData(url);
|
|
gen.make();
|
|
const qr = gen.createSvgTag({ scalable: true });
|
|
return raw(qr);
|
|
};
|