mobile-native-barcode-generator
Version:
Library to generate barcodes and qr codes natively using Kotlin and Swift, integrated with react native.
20 lines (19 loc) • 729 B
JavaScript
;
import MobileNativeBarcodeGenerator from "./MobileNativeBarcodeGenerator.js";
export default async function saveBarcodeToGallery(value, width, height, fileName) {
if (value === "") {
throw new Error("Value cannot be empty");
}
if (width <= 0 || typeof width !== "number") {
throw new Error("Width must be a positive number");
}
if (height <= 0 || typeof height !== "number") {
throw new Error("Height must be a positive number");
}
if (fileName.trim() === "") {
throw new Error("Filename cannot be empty");
}
const result = await MobileNativeBarcodeGenerator.saveBarcodeToGallery(value, width, height, fileName);
return result;
}
//# sourceMappingURL=saveBarcodeToGallery.js.map