
Security News
Package Maintainers Call for Improvements to GitHub’s New npm Security Plan
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
@itexperts/barcode-scanner
Advanced tools
A simple EventTarget
for JavaScript to listen to barcode scans done with a keyboard barcode scanner.
When working with plug-and-play USB barcode scanners, it can be a pain to know when a barcode has been scanned. Usually these scanners will be set up as keyboard and "very quickly type" the barcode. We leverage this to detect whether a barcode was scanned. Normally a barcode scanner will type a character within 10ms. Therefore an EAN-13 barcode will need at most 130ms to complete. As a human you'd be fast if you typed a single character every 130ms (unless you are the flash).
Using Yarn
yarn add @itexperts/barcode-scanner
Using NPM
npm i @itexperts/barcode-scanner
import {BarcodeScanner} from "@itexperts/barcode-scanner";
let options = {
timeOut: 130,
characterCount: 13
}
let barcodeScanner = new BarcodeScanner(options);
barcodeScanner.addEventListener('scan', function(e){
let barcode = e.detail;
console.log(barcode);
});
name | default value | description |
---|---|---|
timeOut | 130 | ms within which the characters must be typed |
characterCount | 13 | Amount of characters (13 for EAN-13 |
FAQs
A simple JS to listen for barcode scans
We found that @itexperts/barcode-scanner 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
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.