vue-qrcode-reader
Advanced tools
Comparing version 3.1.9 to 3.2.0
{ | ||
"name": "vue-qrcode-reader", | ||
"description": "A set of Vue.js components for detecting and decoding QR codes.", | ||
"version": "3.1.9", | ||
"version": "3.2.0", | ||
"author": { | ||
@@ -32,3 +32,3 @@ "name": "Niklas Gruhn", | ||
"dependencies": { | ||
"barcode-detector": "^1.0.3", | ||
"barcode-detector": "^2.2.4", | ||
"callforth": "^0.3.1", | ||
@@ -35,0 +35,0 @@ "core-js": "^3.6.5", |
@@ -184,1 +184,2 @@ <p align="center"> | ||
</a> | ||
@@ -0,1 +1,2 @@ | ||
import { BarcodeDetector } from 'barcode-detector' | ||
import { DropImageFetchError } from "./errors.js"; | ||
@@ -44,5 +45,5 @@ import { eventOn } from "callforth"; | ||
export const keepScanning = (videoElement, options) => { | ||
const barcodeDetector = new BarcodeDetector({ formats: ["qr_code"] }); | ||
const { detectHandler, locateHandler, minDelay, formats } = options; | ||
const { detectHandler, locateHandler, minDelay } = options; | ||
const barcodeDetector = new BarcodeDetector({ formats }); | ||
@@ -96,4 +97,4 @@ const processFrame = state => async timeNow => { | ||
export const processFile = async file => { | ||
const barcodeDetector = new BarcodeDetector({ formats: ["qr_code"] }) | ||
export const processFile = async (file, formats) => { | ||
const barcodeDetector = new BarcodeDetector({ formats }) | ||
const detectedCodes = await barcodeDetector.detect(file) | ||
@@ -104,4 +105,4 @@ | ||
export const processUrl = async url => { | ||
const barcodeDetector = new BarcodeDetector({ formats: ["qr_code"] }) | ||
export const processUrl = async (url, formats) => { | ||
const barcodeDetector = new BarcodeDetector({ formats }) | ||
const image = await imageElementFromUrl(url); | ||
@@ -108,0 +109,0 @@ const detectedCodes = await barcodeDetector.detect(image) |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
4413355
82
28986
185
12
+ Added@types/dom-webcodecs@0.1.11(transitive)
+ Added@types/emscripten@1.39.11(transitive)
+ Addedbarcode-detector@2.2.5(transitive)
+ Addedzxing-wasm@1.2.7(transitive)
- Removed@zxing/library@0.18.6(transitive)
- Removed@zxing/text-encoding@0.9.0(transitive)
- Removedbarcode-detector@1.0.4(transitive)
- Removedjsqr@1.4.0(transitive)
- Removedts-custom-error@3.3.1(transitive)
Updatedbarcode-detector@^2.2.4