This is the porting from jsqrcode.
npm install
npm run build
The jsqrcode.js is in dist folder.
Example in index.html. Just inculde jsqrcode.js, then, you can use qrcode object.
<script src="dist/jsqrcode.js"></script>
var qrcode = window.qrcode;
To feed the source image to qrcode object, create a canvas with id of qr-canvas, and drawImage on it, and then call decode to decode the result.
qrcode.decode(); // After decode finished onGetResult event will be evoked
When qrcode is decoded, and get the decoded result.
qrcode.onGetResult = function(decodedResult) {
}
Reference to jsqrcode test.html.