qr-string
v1.0.7
Published
Generate a PNG/BASE64 string to generate a QR code
Readme
Generate a string that's used to create the QR code. Based on gillstrom/swish-qr.
Install
$ npm install qr-stringExample 1 : Return a Promise resolving into a BASE64 string format.
const qrString = require('qr-string');
qrString({
message: 'Lorem ipsum'
}).then(result => {
console.log(result);
});Example 2 : Return BASE64 string using sync method.
const qrString = require('qr-string');
var qrMessage = {message: 'Lorem ipsum'}
var result = qrString.sync(qrMessage);
console.log(result);Example 3 : Return a formatted string that used to create QR code.
const qrString = require('qr-string');
var qrMessage = {message: 'Lorem ipsum'}
var result = qrString.generateString(qrMessage);
console.log(result);