Security News
The Unpaid Backbone of Open Source: Solo Maintainers Face Increasing Security Demands
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
barcode-detector-polyfill-worker
Advanced tools
Spec compliant polyfill of the [Barcode Detection API](https://wicg.github.io/shape-detection-api/#barcode-detection-api). It can be used for barcode/QR-code recognition in images from various kinds of sources including `<canvas>`, ``, `` (in
Spec compliant polyfill of the Barcode Detection API.
It can be used for barcode/QR-code recognition in images from various kinds of
sources including <canvas>
, <img>
, <image>
(inside SVGs), <video>
, File
, Blob
, ImageData
, ImageBitmap
, OffscreenCanvas
.
[TODO: live demos]
Design goals:
npm install barcode-detector
import BarcodeDetector from "barcode-detector"
// polyfill unless already supported
if (!("BarcodeDetector" in window)) {
window.BarcodeDetector = BarcodeDetector
}
// pick barcode formats. Other formats will be ignored
const barcodeDetector = new BarcodeDetector({ formats: ["qr_code"] })
// directly pass an image element, video element, ...
const barcodes = await barcodeDetector.detect(someImageSource)
// can detect multiple barcodes in one image
const [ barcode1, barcode2, ...evenMoreBarcodes ] = barcodes
// access encoded string
const { rawValue } = barcode1
For in-depth documentation checkout the corresponding MDN page.
src/BarcodeDetectorJsqr.ts
:
aztec
code_128
code_39
code_93
codabar
data_matrix
ean_13
ean_8
itf
pdf417
qr_code
upc_a
upc_e
src/BarcodeDetectorZXing.ts
(not exposed at the moment. See #1):
aztec
code_128
code_39
code_93
codabar
data_matrix
ean_13
ean_8
itf
pdf417
qr_code
upc_a
upc_e
FAQs
Spec compliant polyfill of the [Barcode Detection API](https://wicg.github.io/shape-detection-api/#barcode-detection-api). It can be used for barcode/QR-code recognition in images from various kinds of sources including `<canvas>`, ``, `` (in
The npm package barcode-detector-polyfill-worker receives a total of 4 weekly downloads. As such, barcode-detector-polyfill-worker popularity was classified as not popular.
We found that barcode-detector-polyfill-worker demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
Security News
License exceptions modify the terms of open source licenses, impacting how software can be used, modified, and distributed. Developers should be aware of the legal implications of these exceptions.
Security News
A developer is accusing Tencent of violating the GPL by modifying a Python utility and changing its license to BSD, highlighting the importance of copyleft compliance.