headless-qr

A simple, modern QR code library

README

headless-qr


A simple, modern QR code generator. Adapted from https://github.com/kazuhikoarase/qrcode-generator but without all the junk that was necessary 10 years ago.

Usage


  1. ```js
  2. import { qr } from 'headless-qr';

  3. // generate an n x n array of booleans,
  4. // where `true` is a dark pixel
  5. const modules = qr('https://example.com');

  6. // specify version and error correction
  7. const modules = qr('https://example.com', {
  8. version: 40, // 1 - 40, will select the best version if unspecified
  9. correction: 'Q' // L, M, Q or H
  10. });
  11. ```