browser-barcodescanner
Advanced tools
| 'use strict'; | ||
| async function BrowserBarcodescannerFile(formats, file, callback) { | ||
| async function BrowserBarcodeScannerFile(formats, file, callback) { | ||
| // Check if the browser supports the BarcodeDetector API | ||
@@ -31,2 +31,2 @@ if (!('BarcodeDetector' in window)) throw new Error('BarcodeDetector not supported'); | ||
| exports.BrowserBarcodescannerFile = BrowserBarcodescannerFile; | ||
| exports.BrowserBarcodeScannerFile = BrowserBarcodeScannerFile; |
@@ -1,2 +0,2 @@ | ||
| async function BrowserBarcodescannerFile(formats, file, callback) { | ||
| async function BrowserBarcodeScannerFile(formats, file, callback) { | ||
| // Check if the browser supports the BarcodeDetector API | ||
@@ -29,2 +29,2 @@ if (!('BarcodeDetector' in window)) throw new Error('BarcodeDetector not supported'); | ||
| export { BrowserBarcodescannerFile }; | ||
| export { BrowserBarcodeScannerFile }; |
@@ -6,4 +6,4 @@ declare global { | ||
| } | ||
| export declare function BrowserBarcodescannerFile(formats: string[], file: File, callback: (result: { | ||
| export declare function BrowserBarcodeScannerFile(formats: string[], file: File, callback: (result: { | ||
| res: string; | ||
| }) => void): Promise<void>; |
+1
-6
| { | ||
| "name": "browser-barcodescanner", | ||
| "version": "1.0.1", | ||
| "version": "1.0.2", | ||
| "description": "A browser API based barcode scanner", | ||
@@ -31,7 +31,2 @@ "main": "dist/index.cjs.js", | ||
| }, | ||
| "exports": { | ||
| ".": { | ||
| "default": "./index.js" | ||
| } | ||
| }, | ||
| "homepage": "https://github.com/HyunseungLee-Travis/browser-barcodescanner#readme", | ||
@@ -38,0 +33,0 @@ "devDependencies": { |
+4
-4
@@ -25,3 +25,3 @@ <div align="center"> | ||
| ```js | ||
| import { BrowserBarcodescannerFile } from 'browser-barcodescanner' | ||
| import { BrowserBarcodeScannerFile } from 'browser-barcodescanner' | ||
@@ -35,3 +35,3 @@ const scanButton = document.querySelector('#scan') | ||
| const result = BrowserBarcodescannerFile(['ean_13'], file, result => { | ||
| BrowserBarcodeScannerFile(['ean_13'], file, result => { | ||
| // Do something with result.res | ||
@@ -46,6 +46,6 @@ }) | ||
| ## BrowserBarcodescannerFile | ||
| ## BrowserBarcodeScannerFile | ||
| ```ts | ||
| async function BrowserBarcodescannerFile( | ||
| async function BrowserBarcodeScannerFile( | ||
| formats: string[] = [], | ||
@@ -52,0 +52,0 @@ file: File, |
40038
-0.2%