0.0.1 • Published 8 months ago

qr-manager v0.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

NPM

Codacy Badge Downloads Version install size node


Basic Information.

a powerful package to create qr-codes with images and without images with realy any url, or just use it to validate and scan qr-codes.

Choose Readme type.

NPM

npm i qr-manager

Yarn

yarn add qr-manager

PNPM

pnpm i qr-manager

Usage.

Importing.

const { readQRCode, generateQRCode } = require('qr-manager');

Reading QR-Codes.

const { readQRCode } = require("qr-manager")

const inputPathOrUrl = 'https://example.com/your-qr-code.png'; // Replace with the URL or file path of your QR code image

readQRCode(inputPathOrUrl)
  .then((result) => {
    if (result) {
      console.log('QR code value:', result);
    } else {
      console.log('QR code could not be read.');
    }
  })
  .catch((error) => {
    console.error('Error:', error);
});

Generating QR-Codes.

const { generateQRCode } = require('qr-manager');

// Usage examples:
const url = 'https://example.com';
const imageUrl = 'https://example.com/path/to/your/image.png'; // Optional and you can also use a local file path instead.

// Both usages are valid:
generateQRCode(url, imageUrl);

// or
generateQRCode({ url, imageUrl });

Examples.

!NOTE You can view all the examples here.

License.

This package is licensed under the MIT License. See the LICENSE file for more information.

Support.

If you need support, please join our Discord Server and ask your question in the #support channel.

Issues.

If you have any issues, please open an issue on our GitHub Repository.

Developers.