qr-util

1.1.0 • Public • Published

QR Utils

Simple Promise-based library to generate and read QR codes.

Example

// generate QR code image file
await QRUtil.generateImage('HELLO WORLD', 'temp.png');

// read generated image file
const imageBuffer = fs.readFileSync('temp.png');

// parse the QR code image to get the contained data
const parsedData = await QRUtil.parseQR(imageBuffer);

console.log(parsedData); // HELLO WORLD

Methods

generateDataURL(data: string): Promise<string>;
generateBase64(data: string): Promise<string>;
generateImage(data: string, imagePath: string): Promise<void>;
parseQR(qrImageDataBuffer: Buffer): Promise<string>;

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.1.07latest

Version History

VersionDownloads (Last 7 Days)Published
1.1.07
1.0.10
1.0.00

Package Sidebar

Install

npm i qr-util

Weekly Downloads

6

Version

1.1.0

License

ISC

Unpacked Size

2.08 kB

Total Files

3

Last publish

Collaborators

  • jakecyr