šŸš€ Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more →
Socket
Sign inDemoInstall
Socket

qrcode-generator

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

qrcode-generator

QR Code Generator implementation in JavaScript.

1.4.4
latest
Source
npm
Version published
Weekly downloads
387K
6.02%
Maintainers
1
Weekly downloads
Ā 
Created

What is qrcode-generator?

The qrcode-generator npm package is a versatile tool for generating QR codes in various formats and configurations. It supports different error correction levels, QR code versions, and allows customization of the output format (e.g., HTML, SVG, and canvas).

What are qrcode-generator's main functionalities?

Generate QR Code in HTML

This feature allows you to generate a QR code and output it as an HTML image tag. The code sample demonstrates creating a QR code with low error correction level and version 4, adding data to it, and generating an HTML image tag.

const QRCode = require('qrcode-generator');
const qr = QRCode(4, 'L');
qr.addData('Hello, world!');
qr.make();
console.log(qr.createImgTag());

Generate QR Code in SVG

This feature allows you to generate a QR code and output it as an SVG tag. The code sample demonstrates creating a QR code with low error correction level and version 4, adding data to it, and generating an SVG tag.

const QRCode = require('qrcode-generator');
const qr = QRCode(4, 'L');
qr.addData('Hello, world!');
qr.make();
console.log(qr.createSvgTag());

Generate QR Code in Canvas

This feature allows you to generate a QR code and render it on an HTML canvas element. The code sample demonstrates creating a QR code with low error correction level and version 4, adding data to it, and rendering it on a canvas.

const QRCode = require('qrcode-generator');
const qr = QRCode(4, 'L');
qr.addData('Hello, world!');
qr.make();
const canvas = document.createElement('canvas');
const context = canvas.getContext('2d');
qr.renderTo2dContext(context);

Other packages similar to qrcode-generator

Keywords

qr

FAQs

Package last updated on 18 Sep 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts