UNPKG

@qr-platform/qr-code.js

Version:

QRCode.js is a professional JavaScript/TypeScript library for creating customized QR codes, offering a blend of simplicity and sophistication. With versatile styling options—dot shapes, colors, gradients, embedded images, borders, and text—it enables you

28 lines (27 loc) 1.07 kB
import { ScanValidatorResponse } from './scan-validators/abstract-scan-validator'; export interface ImageDataLike { data: Uint8ClampedArray; width: number; height: number; } /** * QR Code validator for Node.js environment */ export declare const qrValidatorZbar: { /** * Validate QR code using zbar with SVG as input * @param svgSource SVG string containing QR code * @param width Width to use for validation * @param height Height to use for validation * @param debug Enable detailed debugging * @returns Validation result */ validateZbar: (svgSource: string | undefined, debug?: boolean) => Promise<ScanValidatorResponse>; /** * Validate QR code using zbar with ImageData as input * @param imageData Object with { data: Uint8ClampedArray, width: number, height: number } * @param debug Enable detailed debugging (passed to underlying validator) * @returns Validation result */ validateZbarImageData: (imageData: ImageDataLike, debug?: boolean) => Promise<ScanValidatorResponse>; };