@lowlighter/qrcode
v2.0.0
Published
Pure TypeScript QRcode generator with no dependencies.
Downloads
16
Readme
🔳 QR Code generator
📑 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
andsvg
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: