barcode-tool
Version:
lightweight npm package that facilitates barcode generation and detection. It leverages the Barcode Detection API for barcode scanning directly in web browsers and provides an intuitive interface for generating various barcode formats. Seamlessly integrat
10 lines (9 loc) • 377 B
TypeScript
export type DetectBarcodeParams = {
image: HTMLElement | Blob | HTMLCanvasElement | HTMLImageElement | HTMLVideoElement | ImageBitmap | ImageData | SVGImageElement | undefined;
formats?: string[];
};
export type Barcode = {
format: string;
rawValue: string;
};
export declare function detectBarcode({ image, formats }: DetectBarcodeParams): Promise<Barcode[]>;