
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@scandit/web-barcode-link
Advanced tools
Scandit's Barcode Link SDK allows you to scan barcodes on your mobile device and automatically send them to another device.
$ npm i @scandit/web-barcode-link
import { BarcodeLink, BarcodeLinkMode } from "scandit-web-barcode-link";
const barcodeLink = BarcodeLink.forLicenseKey("-- ENTER YOUR SCANDIT LICENSE KEY HERE --")
.setBarcodeLinkMode(BarcodeLinkMode.ContinuousListBuilding)
.setSymbologies({ ean13Upca: { enabled: true } })
.addListener({
onCapture: (barcodes) => console.log("Captured:", barcodes}),
});
await barcodeLink.initialize();
Static method for creating a new BarcodeLink instance with your license key. This is the only way to construct a new BarcodeLink instance.
const barcodeLink = BarcodeLink.forLicenseKey("-- ENTER YOUR SCANDIT LICENSE KEY HERE --");
Specify the scanning mode to enable:
Value | Description |
---|---|
SingleScanning | Send one barcode and close the session |
ContinuousScanning | Send barcodes in realtime and close the session when you want |
SingleListBuilding | Send a list of barcodes and close the session |
ContinuousListBuilding | Send lists of barcodes in realtime and close the session when you want |
import { BarcodeLinkMode } from "@scandit/web-barcode-link";
barcodeLink.setBarcodeLinkMode(BarcodeLinkMode.ContinuousListBuilding);
Specify which symbologies to enable, and optional settings for each symbology:
barcodeLink.setSymbologies({
ean13Upca: { enabled: true },
});
Specify a regex that will be used to ignore barcodes that do not match the regular expression:
barcodeLink.setBarcodeRegexValidation(/\d+/);
Add a listener to listen to specific events:
barcodeLink.addListener({
onCancel?() {}
onCapture?(barcodes) {}
onDeviceConnected?() {} // Only triggered in a uiless flow
onDeviceDisconnected?() {} // Only triggered in a uiless flow
});
Remove a listener:
barcodeLink.removeListener(listener);
Start the barcode link workflow
Optionally accepts a flow
parameter, that can be used to enable different workflows.
Opens a popup that will guide you through the scanning process. This is the default flow.
await barcodeLink.initialize();
// Equivalent
await barcodeLink.initialize(new BarcodeLinkUiFlow());
FAQs
The Scandit Web Barcode Link package
We found that @scandit/web-barcode-link demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers 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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.