mobile-native-barcode-generator
Version:
Library to generate barcodes and qr codes natively using Kotlin and Swift, integrated with react native.
12 lines (11 loc) • 496 B
JavaScript
;
import MobileNativeBarcodeGenerator from "./MobileNativeBarcodeGenerator.js";
export default async function generateBarcode(value, width, height) {
if (value.length > 80) {
throw new Error("Barcode value length must be less than 80 characters");
}
const returnValue = await MobileNativeBarcodeGenerator.generateBarcode(value, width, height);
const finalReturn = `data:image/png;base64,${returnValue}`;
return finalReturn;
}
//# sourceMappingURL=generateBarcode.js.map