Skip to content

Latest commit

 

History

History
42 lines (32 loc) · 741 Bytes

README.md

File metadata and controls

42 lines (32 loc) · 741 Bytes

QRCode Encoder and Decoder

Based on qrcodejs and jsqrcode

Install

Add Github repo url as dependency

{
    "dependencies": {
        "qrcode": "git+https://github.com/tokenkit/qrcode.git"
    }
}

And

npm install

API in ES6

import qrcode from 'qrcode'

qrcode.encode(document.getElementById('container'), 'some text to encode')

qrcode.decode(ImageBase64Str, (err, data) => {
    if (err) {
        return console.log(err)
    }
    console.log(data)
})

For more qrcode.encode() options, see Base Usages

Demo

npm install
npm run test