# yqrreader

> A simple live qr-reader for javascript

Latest version **1.0.1** (published 2016-10-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install yqrreader
pnpm add yqrreader
yarn add yqrreader
bun add yqrreader
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2016-10-06 |
| First published | 2016-10-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Omar Polo |
| Maintainers | yumh |
| Keywords | qr, reader |

## Links

- npm: https://www.npmjs.com/package/yqrreader
- Repository: https://github.com/omar-polo/yQrReader
- Homepage: https://omar-polo.github.io/pages/yQrReader/
- Issues: https://github.com/omar-polo/yQrReader/issues
- npm.io page: https://npm.io/package/yqrreader

## Dependencies (1)

- [qrcode-reader](https://npm.io/package/qrcode-reader.md) ^0.2.2

## Recent versions

- 1.0.1 (latest) — 2016-10-06
- 1.0.0 — 2016-10-06

## README

# yQrReader

A thiny wrapper around [edi9999/jsqrcode](https://github.com/edi9999/jsqrcode),
because a live *QR Reader* is pretty cool, right?

NOTE: Due to some browser restrictions, access to camera requires an `https`
connection (being connected to `localhost` also works)

----

### Install

```
% npm i --save yqrreader
```

### Example of use:

```js
// es6

import { yQrReader } from 'yQrReader'

const camera = document.querySelector("div#camera");

yQrReader(camera)
  .then(data => console.log("Hooray!", data))
  ;
```

### Requirements

* Promises
* es6
* `navigator.mediaDevices.getUserMedia` -- obviously
* canvas support

Please, mind that `yQrReader` is written in es6, so you may require a tool (like'
babel) to translate it back to es5.

For that puorpose, you'll find a compiled version (`dist/yQrReader.js`) which
can be included in a plain `html` page (see `dist/sample.html` as reference).
You can also compile it by yourself: simply install the `dev-deps` of this
package and run `grunt build`.

See it live! https://omar-polo.github.io/pages/yQrReader/

### Todo:

* [ ] customize delay interval
* [ ] improve a bit the function that takes a photo from the camera?

---
_Source: https://npm.io/package/yqrreader · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
