Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

qrcode-decoder

Package Overview
Dependencies
Maintainers
0
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

qrcode-decoder

Tool for decoding qrcode

  • 0.3.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4.8K
increased by61.34%
Maintainers
0
Weekly downloads
 
Created
Source

qrcode-decoder

npm NPM downloads license

简体中文 | English

A tool for decoding qrcode.

Directory

.
├── demo            code demo
├── dist            build output
├── doc             docs
├── src             source code
├── test            unit test
├── CHANGELOG.md    change log
└── TODO.md         todo list

Guide

Use pnpm to install.

$ pnpm install --save qrcode-decoder

Using in webpack:

import QrcodeDecoder from 'qrcode-decoder';

Using in browser:

<script src="https://unpkg.com/qrcode-decoder@0.3.1/dist/index.min.js"></script>

Demo

QrcodeDecoder()

User new to create a decoder object.

var qr = new QrcodeDecoder();
decodeFromImage(img, options)

Decodes an image from url or an <img> element with a src attribute set.

qr.decodeFromImage(img).then((res) => {
  console.log(res);
});

Demo

decodeFromVideo(videoElem, options)

Decodes directly from a video with a well specified src attribute

qr.decodeFromVideo(videoElement).then((res) => {
  console.log(res);
});

Demo

decodeFromCamera(videoElem, options)

Decodes from a videoElement.

qr.decodeFromCamera(videoElem).then((res) => {
  console.log(res);
});

Demo

stop()

Stops the current qr from searching for a QRCode.

Develop

Install dependencies:

$ pnpm install

Build code:

$ pnpm run build

Run unit test:

$ pnpm test

Modify version in package.json, run release script:

$ pnpm run release

Publish

$ pnpm publish

License

MIT

Keywords

FAQs

Package last updated on 17 Jul 2024

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