QR Code
QRCode object is used to generate a JavaScript byte array based on an input string.
- Module:
utils/qrcode
- Source: /utils/qrcode.js
- Status:
stable
- Group:
core
Basic Usage
import { qrcode } from "sdk/utils";
import { response } from "sdk/http";
let qrCodeBytes = qrcode.generateQRCode("https://www.dirigible.io");
console.log("QR Code Bytes: " + qrCodeBytes);
response.setContentType('image/png')
response.write(qrCodeBytes);
response.flush();
response.close();
Functions
Function | Description | Returns |
---|---|---|
generateQRCode(input) | Generate a byte array from the input string | byte array |