็ฎไฝไธญๆ | English
A tool for decoding qrcode.
.
โโโ demo code demo
โโโ dist build output
โโโ doc docs
โโโ src source code
โโโ test unit test
โโโ CHANGELOG.md change log
โโโ TODO.md todo list
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/[email protected]/dist/index.min.js"></script>
User new
to create a decoder object.
var qr = new QrcodeDecoder();
Decodes an image from url or an <img>
element with a src
attribute set.
qr.decodeFromImage(img).then((res) => {
console.log(res);
});
Decodes directly from a video with a well specified src
attribute
qr.decodeFromVideo(videoElement).then((res) => {
console.log(res);
});
Decodes from a videoElement.
qr.decodeFromCamera(videoElem).then((res) => {
console.log(res);
});
Stops the current qr
from searching for a QRCode.
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