Socket
Socket
Sign inDemoInstall

jsqr

Package Overview
Dependencies
Maintainers
2
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsqr

A pure javascript QR code reading library that takes in raw images and will locate, extract and parse any QR code found within.


Version published
Weekly downloads
206K
decreased by-22.06%
Maintainers
2
Weekly downloads
 
Created

What is jsqr?

The jsqr npm package is a JavaScript library for detecting and decoding QR codes from images. It is designed to be lightweight and efficient, making it suitable for use in web applications where QR code scanning functionality is needed.

What are jsqr's main functionalities?

Detect and Decode QR Code from Image Data

This feature allows you to detect and decode a QR code from image data. The `jsQR` function takes the image data, width, and height as input and returns the decoded QR code data if a QR code is found.

const jsQR = require('jsqr');
const imageData = getImageDataFromCanvas(); // Assume this function gets image data from a canvas element
const qrCode = jsQR(imageData.data, imageData.width, imageData.height);
if (qrCode) {
  console.log('Found QR code', qrCode.data);
} else {
  console.log('No QR code found');
}

Other packages similar to jsqr

FAQs

Package last updated on 24 Apr 2021

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