qr-string

1.0.7 • Public • Published

Generate a string that's used to create the QR code. Based on gillstrom/swish-qr.

Install

$ npm install qr-string

Example 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);

Readme

Keywords

Package Sidebar

Install

npm i qr-string

Weekly Downloads

4

Version

1.0.7

License

ISC

Last publish

Collaborators

  • aaamitsingh