Socket
Socket
Sign inDemoInstall

swissqrbill

Package Overview
Dependencies
Maintainers
1
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

swissqrbill - npm Package Compare versions

Comparing version 2.0.2 to 2.0.3

3

CHANGELOG.md
# Change Log
# [v2.0.3](https://github.com/rogerrrrrrrs/swissqrbill/compare/v2.0.2...v2.0.3) - 09.12.2020
* Fixed a problem with QR Code encoding that caused QR Code scanning to fail at certain banks.
# [v2.0.2](https://github.com/rogerrrrrrrs/swissqrbill/compare/v2.0.1...v2.0.2) - 19.08.2020

@@ -5,0 +8,0 @@ * Fixed an issue that caused reference to render incorrectly.

2

lib/node.js

@@ -17,3 +17,3 @@ "use strict";

var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);

@@ -20,0 +20,0 @@ return result;

@@ -8,3 +8,3 @@ "use strict";

const svg_parser_1 = require("svg-parser");
const qrcode_svg_1 = __importDefault(require("qrcode-svg"));
const qrcode_svg_1 = __importDefault(require("@rogerrrrrrrs/qrcode-svg"));
const iban_1 = __importDefault(require("iban"));

@@ -583,31 +583,31 @@ const extended_pdf_1 = __importDefault(require("./extended-pdf"));

//-- Swiss Payments Code
qrString += "SPC\n";
qrString += "SPC";
//-- Version
qrString += "0200\n";
qrString += "\n0200";
//-- Coding Type UTF-8
qrString += "1\n";
qrString += "\n1";
//-- IBAN
qrString += (_a = this._data.creditor.account.replace(/ /g, "") + "\n") !== null && _a !== void 0 ? _a : "\n";
qrString += (_a = "\n" + this._data.creditor.account.replace(/ /g, "")) !== null && _a !== void 0 ? _a : "\n";
//-- Creditor
if (this._data.creditor.houseNumber !== undefined) {
// Adress Type
qrString += "S\n";
// Address Type
qrString += "\nS";
// Name
qrString += this._data.creditor.name + "\n";
qrString += "\n" + this._data.creditor.name;
// Address
qrString += this._data.creditor.address + "\n";
qrString += "\n" + this._data.creditor.address;
// House number
qrString += this._data.creditor.houseNumber + "\n";
qrString += "\n" + this._data.creditor.houseNumber;
// Zip
qrString += this._data.creditor.zip + "\n";
qrString += "\n" + this._data.creditor.zip;
// City
qrString += this._data.creditor.city + "\n";
qrString += "\n" + this._data.creditor.city;
}
else {
// Adress Type
qrString += "K\n";
// Address Type
qrString += "\nK";
// Name
qrString += this._data.creditor.name + "\n";
qrString += "\n" + this._data.creditor.name;
// Address
qrString += this._data.creditor.address + "\n";
qrString += "\n" + this._data.creditor.address;
// Zip + city

@@ -617,3 +617,3 @@ if ((this._data.creditor.zip + " " + this._data.creditor.city).length > 70) {

}
qrString += this._data.creditor.zip + " " + this._data.creditor.city + "\n";
qrString += "\n" + this._data.creditor.zip + " " + this._data.creditor.city;
// Empty zip field

@@ -624,3 +624,3 @@ qrString += "\n";

}
qrString += this._data.creditor.country + "\n";
qrString += "\n" + this._data.creditor.country;
//-- 7 x empty

@@ -636,3 +636,3 @@ qrString += "\n"; // 1

if (this._data.amount !== undefined) {
qrString += this._data.amount.toFixed(2) + "\n";
qrString += "\n" + this._data.amount.toFixed(2);
}

@@ -643,3 +643,3 @@ else {

//-- Currency
qrString += this._data.currency + "\n";
qrString += "\n" + this._data.currency;
//-- Debtor

@@ -649,21 +649,21 @@ if (this._data.debtor !== undefined) {

// Address type
qrString += "S\n";
qrString += "\nS";
// Name
qrString += this._data.debtor.name + "\n";
qrString += "\n" + this._data.debtor.name;
// Address
qrString += this._data.debtor.address + "\n";
qrString += "\n" + this._data.debtor.address;
// House number
qrString += this._data.debtor.houseNumber + "\n";
qrString += "\n" + this._data.debtor.houseNumber;
// Zip
qrString += this._data.debtor.zip + "\n";
qrString += "\n" + this._data.debtor.zip;
// City
qrString += this._data.debtor.city + "\n";
qrString += "\n" + this._data.debtor.city;
}
else {
// Address type
qrString += "K\n";
qrString += "\nK";
// Name
qrString += this._data.debtor.name + "\n";
qrString += "\n" + this._data.debtor.name;
// Address
qrString += this._data.debtor.address + "\n";
qrString += "\n" + this._data.debtor.address;
// Zip + city

@@ -673,3 +673,3 @@ if ((this._data.debtor.zip + " " + this._data.debtor.city).length > 70) {

}
qrString += this._data.debtor.zip + " " + this._data.debtor.city + "\n";
qrString += "\n" + this._data.debtor.zip + " " + this._data.debtor.city;
// Empty field zip

@@ -681,3 +681,3 @@ qrString += "\n";

// Country
qrString += this._data.debtor.country + "\n";
qrString += "\n" + this._data.debtor.country;
}

@@ -701,6 +701,6 @@ else {

//-- Reference type
qrString += this._referenceType + "\n";
qrString += "\n" + this._referenceType;
//-- Reference
if (this._data.reference !== undefined) {
qrString += this._data.reference.replace(/ /g, "") + "\n";
qrString += "\n" + this._data.reference.replace(/ /g, "");
}

@@ -712,3 +712,3 @@ else {

if (this._data.message !== undefined) {
qrString += this._data.message + "\n";
qrString += "\n" + this._data.message;
}

@@ -719,6 +719,6 @@ else {

//-- End Payment Data
qrString += "EPD" + "\n";
qrString += "\n" + "EPD";
//-- Additional information
if (this._data.additionalInformation !== undefined) {
qrString += this._data.additionalInformation + "\n";
qrString += "\n" + this._data.additionalInformation;
}

@@ -730,6 +730,6 @@ else {

if (this._data.av1 !== undefined) {
qrString += this._data.av1 + "\n";
qrString += "\n" + this._data.av1;
}
if (this._data.av2 !== undefined) {
qrString += this._data.av2;
qrString += "\n" + this._data.av2;
}

@@ -736,0 +736,0 @@ //-- Create QR Code

{
"name": "swissqrbill",
"version": "2.0.2",
"version": "2.0.3",
"description": "Swiss QR Bill generation in Node.js and browsers ",

@@ -14,3 +14,3 @@ "main": "./lib/node",

"test-windows": "tsc && cd tests && call run-windows.bat",
"build": "sudo tsc && webpack --mode development"
"build": "tsc && webpack --mode development"
},

@@ -23,8 +23,13 @@ "repository": {

"swiss",
"schweiz",
"switzerland",
"schweiz",
"qr",
"bill",
"invoice",
"rechnung"
"rechnung",
"swiss-qr-invoice",
"swiss-qr-bill",
"qr-invoice",
"qr-rechnung",
"fattura"
],

@@ -38,2 +43,3 @@ "author": "Roger Schönbächler",

"devDependencies": {
"@types/blob-stream": "^0.1.30",
"@types/iban": "0.0.30",

@@ -46,14 +52,16 @@ "@types/node": "^14.0.0",

"@typescript-eslint/parser": "^2.24.0",
"@types/blob-stream": "^0.1.30",
"buffer": "^6.0.3",
"eslint": "^6.8.0",
"stream-browserify": "^3.0.0",
"ts-loader": "^8.0.0",
"typescript": "^3.9.6",
"webpack": "^4.43.0",
"webpack-cli": "^3.3.12"
"typescript": "^4.0.2",
"util": "^0.12.3",
"webpack": "^5.0.0",
"webpack-cli": "^4.0.0"
},
"dependencies": {
"@rogerrrrrrrs/qrcode-svg": "^1.2.1",
"blob-stream": "^0.1.3",
"iban": "0.0.14",
"pdfkit": "^0.11.0",
"qrcode-svg": "^1.1.0",
"svg-parser": "^2.0.4",

@@ -60,0 +68,0 @@ "svgpath": "^2.2.3"

@@ -116,3 +116,3 @@ # SwissQRBill

You can see a fully working example over at https://github.com/Rogerrrrrrrs/SwissQRBill-browser-example.
You can see a fully working example at https://github.com/Rogerrrrrrrs/SwissQRBill-browser-example.

@@ -126,4 +126,4 @@ <br/>

A simple how to guide to generate a complete bill can be found in [doc/how-to-create-a-complete-bill.md](https://github.com/Rogerrrrrrrs/SwissQRBill/blob/master/doc/how-to-create-a-complete-bill.md). You will learn how to create a PDF that looks like this:
A simple guide how to generate a complete bill can be found in [doc/how-to-create-a-complete-bill.md](https://github.com/Rogerrrrrrrs/SwissQRBill/blob/master/doc/how-to-create-a-complete-bill.md). You will learn how to create a PDF that looks like this:
[<img src="https://raw.githubusercontent.com/Rogerrrrrrrs/SwissQRBill/master/assets/complete-qr-bill.png">](https://github.com/Rogerrrrrrrs/SwissQRBill/tree/master/doc/how-to-create-a-complete-bill.md)

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

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