You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Bumps [mixin-deep](https://github.com/jonschlinkert/mixin-deep) from 1.3.1 to 1.3.2. - [Release notes](https://github.com/jonschlinkert/mixin-deep/releases) - [Commits](https://github.com/jonschlinkert/mixin-deep/compare/1.3.1...1.3.2) Signed-off-by: dependabot[bot] <support@github.com> |
6 years ago | |
|---|---|---|
| .github | 7 years ago | |
| config | 7 years ago | |
| demo | 6 years ago | |
| doc | 7 years ago | |
| src | 6 years ago | |
| test | 7 years ago | |
| .babelrc | 7 years ago | |
| .editorconfig | 7 years ago | |
| .eslintignore | 7 years ago | |
| .eslintrc.js | 7 years ago | |
| .gitignore | 7 years ago | |
| .npmignore | 7 years ago | |
| .travis.yml | 7 years ago | |
| CHANGELOG.md | 7 years ago | |
| LICENSE | 7 years ago | |
| README.md | 7 years ago | |
| README.zh-CN.md | 7 years ago | |
| TODO.md | 7 years ago | |
| package.json | 6 years ago | |
| yarn.lock | 6 years ago | |
README.md
qrcode-decoder
简体中文 | 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 npm to install.
$ npm install --save qrcode-decoder
Using in webpack:
import QrcodeDecoder from 'qrcode-decoder';
Using in browser:
<script src="node_modules/qrcode-decoder/dist/index.aio.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);
});
decodeFromVideo(videoElem, options)
Decodes directly from a video with a well specified src attribute
qr.decodeFromVideo(videoElement).then((res) => {
console.log(res);
});
decodeFromCamera(videoElem, options)
Decodes from a videoElement.
qr.decodeFromCamera(videoElem).then((res) => {
console.log(res);
});
stop()
Stops the current qr from searching for a QRCode.
Develop
Install dependencies:
$ npm install
Build code:
$ npm run build
Run unit test:
$ npm test
Modify version in package.json, run release script:
$ npm run release
Publish
$ npm publish