Skip to content

tokenkit/qrcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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