11 lines
215 B
TypeScript
11 lines
215 B
TypeScript
import QRCode from "qrcode";
|
|
|
|
export async function makeQrPng(text: string): Promise<Buffer> {
|
|
return QRCode.toBuffer(text, {
|
|
type: "png",
|
|
width: 512,
|
|
margin: 1,
|
|
errorCorrectionLevel: "M",
|
|
});
|
|
}
|