uqr
- Version 0.1.2
- Published
- 72 kB
- No dependencies
- MIT license
Install
npm i uqryarn add uqrpnpm add uqrOverview
Generate QR Code universally, in any runtime, to ANSI, Unicode or SVG.
Index
Functions
Interfaces
Enums
Type Aliases
Functions
function encode
encode: ( data: QrCodeGenerateData, options?: QrCodeGenerateOptions) => QrCodeGenerateResult;function renderANSI
renderANSI: ( data: QrCodeGenerateData, options?: QrCodeGenerateOptions) => string;Render QR Code with ANSI color for terminal
function renderSVG
renderSVG: ( data: QrCodeGenerateData, options?: QrCodeGenerateSvgOptions) => string;Render QR Code with ANSI color for terminal
function renderUnicode
renderUnicode: ( data: QrCodeGenerateData, options?: QrCodeGenerateUnicodeOptions) => string;Render QR Code with unicode
█,░
function renderUnicodeCompact
renderUnicodeCompact: ( data: QrCodeGenerateData, options?: QrCodeGenerateOptions) => string;Render QR Code with two rows into one line with unicode
▀,▄,█,
Interfaces
interface QrCodeGenerateInvertableOptions
interface QrCodeGenerateInvertableOptions extends QrCodeGenerateOptions {}property invert
invert?: boolean;interface QrCodeGenerateOptions
interface QrCodeGenerateOptions {}property boostEcc
boostEcc?: boolean;Boost the error correction level to the maximum allowed by the version and size
property border
border?: number;Border around the QR code
1
property ecc
ecc?: 'L' | 'M' | 'Q' | 'H';Error correction level
L - Allows recovery of up to 7% data loss M - Allows recovery of up to 15% data loss Q - Allows recovery of up to 25% data loss H - Allows recovery of up to 30% data loss
'L'
property invert
invert?: boolean;Invert black and white
property maskPattern
maskPattern?: number;Mask pattern to use
-1 (auto)
property maxVersion
maxVersion?: number;Maximum version of the QR code (1-40) 40
property minVersion
minVersion?: number;Minimum version of the QR code (1-40) 1
property onEncoded
onEncoded?: (qr: QrCodeGenerateResult) => void;Callback function to receive the generated QR Code
interface QrCodeGenerateResult
interface QrCodeGenerateResult {}property data
data: boolean[][];Two dimensional array representing the QR Code
truefor black,falsefor white
property maskPattern
maskPattern: number;Mask pattern used
property size
size: number;Width and height of the QR Code array
property types
types: QrCodeDataType[][];Data type of each module
property version
version: number;QR Code version
interface QrCodeGenerateSvgOptions
interface QrCodeGenerateSvgOptions extends QrCodeGenerateOptions {}property blackColor
blackColor?: string;Color of the black module
'black'
property pixelSize
pixelSize?: number;Size of each pixel
20
property whiteColor
whiteColor?: string;Color of the white module
'white'
interface QrCodeGenerateUnicodeOptions
interface QrCodeGenerateUnicodeOptions extends QrCodeGenerateInvertableOptions {}Enums
Type Aliases
type QrCodeGenerateData
type QrCodeGenerateData = string | Readonly<Array<number>>;String or binary
Package Files (1)
Dependencies (0)
No dependencies.
Dev Dependencies (16)
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/uqr.
- Markdown[](https://www.jsdocs.io/package/uqr)
- HTML<a href="https://www.jsdocs.io/package/uqr"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 2594 ms. - Missing or incorrect documentation? Open an issue for this package.
