npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

qrmanual

v1.3.3

Published

Implementação de QR Code v2-L (25×25, correção L) em TypeScript

Readme

qrmanual

npm version build status

qrmanual is a TypeScript library for generating fully programmatic QR Codes conforming to Version 2 - Level L (25×25 modules, low error correction) without any external dependencies.


🚀 Features

  • Byte Mode (UTF-8) encoding with terminator and padding handling
  • Data and ECC (10 bytes) codewords generation via Reed–Solomon over Galois Field GF(256)
  • Construction of a 25×25 matrix with Finder Patterns, Alignment Pattern, Timing Pattern, Format Information and application of Mask 0
  • Direct scalable SVG output
  • Modular API: import only what you need (encoder, matrix, svg)

📦 Installation

Install via npm or Yarn:

npm install qrmanual
# or
yarn add qrmanual

💡 Usage Examples

Node.js (CommonJS)

const { generateQRCodeSVG } = require('qrmanual');
const fs = require('fs');

const payload = 'https://example.com';
const svg = generateQRCodeSVG(payload);

fs.writeFileSync('qr.svg', svg, 'utf8');
console.log('QR Code saved to qr.svg');

TypeScript (ES Modules)

import { generateQRCodeSVG } from 'qrmanual';
import { writeFileSync } from 'fs';

const svg = generateQRCodeSVG('Hello, world!');
writeFileSync('qr.svg', svg, 'utf8');
console.log('QR Code generated: qr.svg');

Browser (ES Modules)

<div id="qr"></div>
<script type="module">
  import { generateQRCodeSVG } from 'qrmanual';
  document.getElementById('qr').innerHTML = generateQRCodeSVG('https://example.com');
</script>

🛠️ API Reference

| Function | Signature | Description | | -------------------------- | ------------------------------------------------ | ----------------------------------------------------------------- | | encodePayloadToCodewords | (payload: string) => number[] | Returns 44 codewords (34 data + 10 ECC) for the given text | | buildMatrix | (codewords: number[]) => (0\|1)[][] | Builds the 25×25 matrix of modules (0 = white, 1 = black) | | renderSVG | (matrix: (0\|1)[][], scale?: number) => string | Converts a matrix to an SVG string. Adjust scale as needed. | | generateQRCodeSVG | (payload: string) => string | Full pipeline: encodes, builds matrix, and returns SVG |

Default mask: always uses Mask 0. To support other masks or error levels, please modify the modules or submit a PR.


🤝 Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository
  2. git clone https://github.com/kauecavalcante/qrmanual.git
  3. npm install
  4. npm run build to compile
  5. npm test to run tests
  6. Open a Pull Request with your changes

Check CONTRIBUTING.md for detailed guidelines.


📄 License

This project is licensed under the MIT License.