New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

awesome-qr-code-generator

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

awesome-qr-code-generator

QR code generator

1.0.8
latest
Source
npm
Version published
Weekly downloads
6
-25%
Maintainers
1
Weekly downloads
 
Created
Source

awesome-qr-code-generator

Simple QR code generator. Output Svg & Png

Installation

For install npm package inside your project folder do:

npm install --save awesome-qr-code-generator

ES6/ES7

awesome-qr-code-generator can be used in browser through module bundlers like Browserify and Webpack

import { toDataURL, toSvgString } from 'awesome-qr-code-generator';

const svgString = toSvgString(text);
const pngBase64 = toDataURL(text);

API

toSvgString(text, [options])
toDataURL(text, [options])

text

Type: String|Array

Text to encode or a list of objects describing segments.

options

Optional


QR Code options
margin

Type: Number
Default: 1

Define how much wide the quiet zone should be.

scale

Type: Number
Default: 20

Scale factor. A value of 1 means 1px per modules (black dots). Affects only the quality of PNG

codeColor

Type: String
Default: #000000ff

Color of qr code. Value must be in hex format (RGBA).

backgroundColor

Type: String
Default: #ffffffff

Background Color. Value must be in hex format (RGBA).

Keywords

qr

FAQs

Package last updated on 30 Nov 2022

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