1.0.14 • Published 7 months ago

seqrity v1.0.14

Weekly downloads
-
License
ISC
Repository
github
Last release
7 months ago

QR code generator


A qr code generator written in TypeScript without using external libraries. I created this program for educational purposes. While coding I based on the ISO/IEC18004 standard. Code in the next versions will be refactored, and there will be documentation describing each operation. As for the generator, I plan to rewrite it in the Rust lang, also for educational purposes :p

The program allows you to generate qr code with a selected level of error correction LMQH, and in size from 1 to 40 version (21x21 - 177x177 pixels). It is possible to set the minimum limit of the generator's options. I'm also planning to add the ability to generate qr code with proper mask and in chosen encoding method (byte, numeric, alphanumeric, kanji). Currently available static options are mask '100' in byte coding.

>>> npm install
>>> node run dev
// sample usage
const app = () => {
    new QRcode("https://youtu.be/dQw4w9WgXcQ").render();
}

qr code with rick

// sample usage
const app = () => {
  const options = {
    minErrorLevel: "H",
    minVersion: 2,
  };
  new QRcode("Hello world", options).render();
}

qr code with hello world

// sample usage
const app = () => {
  const options = {
    minErrorLevel: "L",
        minVersion: 3,
    };
    new QRcode("Hello Cube", options).render();
}

qr code with hello cube

// sample usage
const app = async () => {
    const data = {
        time: Date.now(),
        message: 'Hello world',
        next: await randomBytes(16).toString('hex')
    }
    new QRcode(JSON.stringify(data), { minErrorLevel: 'M' }).render()
}

qr code with data

1.0.9

7 months ago

1.0.8

7 months ago

1.0.11

7 months ago

1.0.10

7 months ago

1.0.14

7 months ago

1.0.13

7 months ago

1.0.12

7 months ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago