node-yaqrcode
node-yaqrcode copied to clipboard
Add `maskPattern` option to allow overriding rather than selecting
We are hoping to be able to take advantage of the inherent ability of QR codes to produce multiple different versions of the same QR. We have found that all 8 versions of any QR we have tested scan just fine on modern devices, so the "automatic best mask" does seem to be a bit of a relic of a bygone era anyway.
This PR exposes this facility by introducing an option to allow the overriding of the mask pattern like so: qrcode("abcd", { maskPattern: 2 })
.
This PR has a rather large diff --stat
as I removed the coverage files so as not to radically bloat this PR with lines changed, but can re-add them if you'd prefer they stay. I have also added the testing tools as devDependencies, which introduces a package-lock.json
.