1.1.0 • Published 6 months ago

scannable v1.1.0

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

scannable

npm GitHub demo npm bundle size npm

QR code generation for a modern web.

The core of this is from nayuki's QR code generator

TIP: If you want to try out the methods, open inspect element.

Install

npm i scannable

Deno

import { ... } from 'https://esm.sh/scannable'; // all functions are exposed!

QR Generation

import { renderCanvas, renderSVG, renderText, renderTwoTone } from 'scannable/qr';

// Render it to a canvas
renderCanvas('https://yahoo.net', coolCanvas);

// Outputs a qr code with ASCII text
const text = renderText('https://example.com');

// You can also specify options
const customText = renderText({
	value: 'https://google.com',
	foregroundChar: '%'
});

// You can even use unicode characters to squish text.
const unicodeText = renderTwoTone('https://leodog896.github.io/scannable');

// Or make an SVG!
const svgHTML = renderSVG('https://netflix.com');
1.1.0

6 months ago

1.0.0

6 months ago

0.7.0

2 years ago

0.6.0

2 years ago

0.5.1

2 years ago

0.4.0

2 years ago

0.3.1

2 years ago

0.3.0

2 years ago

0.2.0

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.0.1

2 years ago