New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

hid-barcode-scanner

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hid-barcode-scanner

A JavaScript library for using USB barcode scanners in NodeJS applications.

  • 1.0.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

npm

NodeJS USB-Barcode Scanner Library

A JavaScript library for using USB barcode scanners in NodeJS applications.js.

Intallation

You can install this package by running the following command:

npm i hid-barcode-scanner --save

Usage NodeJS

You can list all devices using the following code:

let getDevices = require('hid-barcode-scanner').getDevices;
console.log(getDevices());
let UsbScanner = require('hid-barcode-scanner').UsbScanner;
let scanner = new UsbScanner({
    vendorId: 1155,
    productId: 2232
});
scanner.on('data', (data) => {
    console.log(data);
});
scanner.on('error', (error) => {
    console.log(error);
});
scanner.startScanning();

To stop scanning, you can use:

scanner.stopScanning();

Keywords

FAQs

Package last updated on 19 Jun 2022

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc