Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

scannable

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

scannable

QR code generation for a modern web

  • 1.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
7
Maintainers
1
Weekly downloads
 
Created
Source

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');

Keywords

FAQs

Package last updated on 06 Nov 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc