@darthmaim/barcode
Version:
Verify EAN barcodes
9 lines (8 loc) • 345 B
TypeScript
import { Encoded } from './types';
export declare type Formats = 'ean13' | 'ean8';
export declare type AutoFormats = Formats | 'auto';
export interface Options {
format?: AutoFormats;
}
export declare function isValid(data: string, { format }?: Options): boolean;
export declare function encode(data: string, { format }?: Options): Encoded;