Skip to content

Files

Latest commit

 

History

History

qrcode

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

🔳 QR Code generator

JSR JSR Score NPM Coverage

📑 Examples

SVG output

import { qrcode } from "./mod.ts"
const svg = qrcode("https://example.com", { output: "svg" })
console.assert(svg.includes("</svg>"))

Console output

import { qrcode } from "./mod.ts"
qrcode("https://example.com", { output: "console" })

Array output

import { qrcode } from "./mod.ts"
const array = qrcode("https://example.com")
console.assert(Array.isArray(array))

✨ Features

  • Support for array, console and svg outputs out-of-the-box.
  • Support for custom colors and error correction level (ECL).
  • Has a modern implementation using TypeScript and EcmaScript modules.
  • Has no external dependencies (not even the DOM's <canvas> element)!
  • Is runtime agnostic (and even works in browsers)!

📜 License and credits

Copyright (c) Simon Lecoq <@lowlighter>. (MIT License)
https://github.com/lowlighter/libs/blob/main/LICENSE

Copyright (c) Project Nayuki. (MIT License)
https://www.nayuki.io/page/qr-code-generator-library

This library is based on the awesome work of @nayiki.

Please take a look at their articles about QR Codes: