New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

swish-qr

Package Overview
Dependencies
Maintainers
2
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

swish-qr

Generate a Swish QR code

latest
Source
npmnpm
Version
2.0.0
Version published
Maintainers
2
Created
Source

swish-qr Build Status

Generate a Swish QR code

Install

$ npm install swish-qr

Usage

const swishQr = require('swish-qr');

swishQr({
	amount: 100,
	lock: ['amount', 'number'],
	message: 'Lorem ipsum',
	number: '0701234567'
}).then(result => {
	console.log(result);
	//=> 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAL...'
});

API

swishQr(options)

Returns a Promise resolving in to a base64 string.

swishQr.sync(options)

Returns a base64 string.

swishQr.generateString(options)

Returns a formatted string that's used to create the QR code.

options

Required
Type: Object

amount

Type: float
Default: 0

The amount of money to send.

lock

Type: Array
Default: []

Lock fields in the Swish application from user input.

message

Type: string
Default: ''

Define a message to send.

number

Type: string
Default: ''

The recipient.

  • swish-qr-cli - CLI for this module.

License

MIT © gillstrom

Keywords

base64

FAQs

Package last updated on 30 Jun 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