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

kewarr

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kewarr

A way to generate qr-codes which can contain images and colour. Works in the browser, in NodeJS and as a CLI.

  • 1.2.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

kewarr

A way to generate qr-codes which can contain images and colour. Works in the browser, in NodeJS and as a CLI.

Table of Contents

  • Requirements
  • Usage
  • Tips
  • License

Requirements

  • Node.js
  • npm (normally comes with Node.js)

Usage

CLI

kewarr https://example.com --picture example.jpg --colorized --name qr-example.png --directory ./

Node

const qr = require('kewarr')
qr(
  'https://example.com',
  '../images/purple-github.jpg',
  'qr-example.png',
	true,
  './'
).then(([qrName]) => {
  console.log('Success! QR-code is saved at: ' + qrName)
})

browser

const qr = require('kewarr/src/lib/theqrmodule')
const combine = qr.combine
require('Jimp/browser/lib/jimp')

qr(
	'https://example.com'
).then(([qr, ver]) =>
	Jimp.read('./purple-github.jpg')
	.then(picture =>
		combine(picture, qr, true, ver)
	)
  .catch(e => qr)
)
.then(qr => {
	qr
	.getBase64(Jimp.AUTO, (err, src) => {
		const img = document.createElement('img')
		img.src = src
		document.body.appendChild(img)
	})
})

Tips

  • Use a square picture instead of a rectangle one.

  • If the size of the picture is large, you should also choose a large -v/version instead of using the default.

Supported Characters

  • Numbers: 0~9

  • Letters: a~z, A~Z

  • Common punctuations:

    · , . : ; + - * / \ ~ ! @ # $ % ^ & ` ' = < > [ ] ( ) ? _ { } | and  (space)
    

License

kewarr is licensed under the MIT license.

FAQs

Package last updated on 05 Jan 2017

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