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 🙏

© 2025 – Pkg Stats / Ryan Hefner

ngx-quick-response-code

v0.0.2

Published

Third party library for generating quick response code inside angular applications.

Readme

NgxQuickResponseCode

Standalone library for generating quick response code in Angular applications.

007

Instruction

# install using npm
npm i ngx-quick-response-code --save
// import in some.module.ts

import { QuickResponseCode } from 'ngx-quick-response-code';

@NgModule([
   imports: [
      . . .,
      QuickResponseCode,
      . . .
   ]
])
class SomeModule {}
<!-- some.page.html -->

<ngx-quick-response-code text="[email protected]" />

<!-- full options list-->>
<ngx-quick-response-code
   text="{{ uri }}"
   quietZoneSize="{{ frameSize }}"
   minimumVersion="{{ version }}"
   minimumErrorLevel="{{ 'L' | 'M' | 'Q' | 'H' }}"
   maximumSize="{{ size }}"
   lightColor="#f4f1de"
   darkColor="#540b0e">
</ngx-quick-response-code>

Structure

Identification, alignment, encoding, data and error.

Size

Module is the smallest unit in a quick response code. They are non-zero fixed sized squares of uniform colour. An empty module is white coloured. Data is encoded from the bottom right corner in a two module wide column read sequentially and vertically. QR code is a square with side length of $$17 + 4 \times version$$ modules. Storage capacity increases with version.

Frame

4 module thick additional empty space that bounds the two-dimensional matrix. Also called Quiet Zone.

Position

$7 \times 7$ squares at the top left, top right, and bottom left corners surrounded by empty modules on the inward-side called Separator. They are called Finder Patterns or Position Markers. They are used to locate and determine rotational orientation.

Alignment

The two dimensional matrix can be divided into $$n \times n$$ square grids with n ranging from 2 to 6 and side length of each grid greater than or equal to 15 modules. A $$5 \times 5$$ Alignment Patterns is placed at the center of each grids bar the grids on the top left, top right and bottom left corner grids. They are used to correct for distortion and tilt orientation.

Format

Lines just beyond the empty modules of Position Markers. Top left position marker contains both vertical and horizontal format lines. Top right position marker has horizontal Format Information line on it's bottom. Bottom left position marker has vertical Format Information line on it's right. They are used to specify masking pattern and error correction level.

Version

Version Information is encoded on the top of the bottom left position marker and left of the top right position marker. This is redundant optional.

Extra

Timing Patters are odd length lines of alternating modules connecting inside corners of Position Markers. They are used to determine the size of each module. There is a dark module at row $$4 * version + 10$$ from bottom and column 9 from the left. Rest of the remaining modules are used for error correction and data.

Data

Versions 1 to 40.

Encoding

| Encoding | Code | |---------------|-------| | Numeric | 0001 | | Alphanumeric | 0010 | | Byte | 0100 | | Kanji Kana | 1000 |

Error Correction

Reed Solomon Algorithm

| Level | Redundancy | |-----------|---------------| | Low | 7% | | Medium | 15% | | Quartile | 25% | | High | 30% |

Format and Version use Golay Algorithm (binary variant) for error correction.

Masking

Mask pattern is chosen to balance the ratio of dark to light modules, minimize consecutive modules of same colour, and distinguish data modules from fixed patterns such as alignment pattern and position markers.

| Value | Formulae | |-----------|-------------------------------------------| | 000 | $$ (i + j) % 2 = 0 $$ | | 001 | $$ i % 2 = 0 $$ | | 010 | $$ j % 3 = 0 $$ | | 011 | $$ (i + j) % 3 = 0 $$ | | 100 | $$ (i / 2 + j / 3) % 2 = 0 $$ | | 101 | $$ (i * j) % 2 + (i * j) % 3 = 0 $$ | | 110 | $$ ((i * j) % 3 + i * j) % 2 = 0 $$ | | 111 | $$ ((i * j) % 3 + i + j) % 2 = 0 $$ |

Arigatou

  • Development and Popularization of QR Code. 2019. Hara, Masahiro. Denso Wave.
  • QR Code