A tiny <3 KB QR code generation library
npm install qr-code-generator-libshell
$ npm install qr-code-generator-lib
`
Usage
$3
`javascript
import { getMatrix, render, renderPath } from 'qr-code-generator-lib'
`
$3
* getMatrix generates a 2D array from the input with dark (true) and light (false) modules.
* render renders an SVG string from the 2D array. The optional 2nd parameter sets the color of the modules.
`javascript
someElement.innerHTML = render(getMatrix('Hello World!'), '#000')
`
* renderPath is intended for reactive frameworks and returns the d-attribute of the path together with the SVG view box dimensions.
`javascript
const {d, dim} = renderPath(getMatrix('Hello World!'))
//...
``