@adobe/helix-qr-code

1.1.2 • Public • Published

Helix QR Code utilities

A library for generating and decoding QR codes

Status

codecov CircleCI GitHub license GitHub issues LGTM Code Quality Grade: JavaScript Renovate enabled semantic-release

Installation

$ npm install @adobe/helix-qr-code

Usage

Decode a QR code from the raw image file data:

const fs = require('fs');
const qr = require('@adobe/helix-qr-code');

const bytes = fs.readFileSync('image_with_qr_code.jpg');
qr.decodeFromBuffer(bytes).then((decoded) => console.log(decoded));

Encode text as a QR code (raw PNG file data output):

const fs = require('fs');
const qr = require('@adobe/helix-qr-code');

qr.encodeToBuffer('text to be encoded').then((buf) => fs.writeFileSync('qr_code.png', buf)));

Encode text as a QR code (SVG output):

const qr = require('@adobe/helix-qr-code');

qr.encodeToSVG('text to be encoded').then((svg) => console.log(svg)));

Encode text as a QR code (Data URL output):

const qr = require('@adobe/helix-qr-code');

qr.encodeToDataURL('text to be encoded').then((dataURL) => console.log(dataURL)));

See the API documentation for more information.

Development

Build

$ npm install

Test

$ npm test

Lint

$ npm run lint

Readme

Keywords

none

Package Sidebar

Install

npm i @adobe/helix-qr-code

Weekly Downloads

26

Version

1.1.2

License

Apache-2.0

Unpacked Size

42.2 kB

Total Files

8

Last publish

Collaborators

  • dylandepass
  • djaeggi
  • adobehalls
  • fullcolorcoder
  • marbec
  • tripod
  • garthdb
  • lazd
  • adobe-admin
  • patrickfulton
  • trieloff
  • shazron
  • krisnye
  • dcpfsdk
  • natebaldwin
  • devongovett
  • aspro83
  • symanovi
  • dpfister
  • stefan-guggisberg
  • korra
  • rofe
  • kptdobe