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 3.1.5-beta.0 to 3.1.5

12

lib/browser/esm/pdf/pdf.js

@@ -50,3 +50,3 @@ import { ExtendedPDF } from "./extended-pdf.js";

this.addPage();
if (this._autoGenerate === true) {
if (this._autoGenerate) {
this.addQRBill();

@@ -93,3 +93,3 @@ this.end();

//-- Lines
if (this._outlines === true) {
if (this._outlines) {
//-- Horizontal line

@@ -115,3 +115,3 @@ if (this.page.height > utils.mm2pt(105)) {

//-- Scissors
if (this._scissors === true) {
if (this._scissors) {
const scissorsTop = "M4.545 -1.803C4.06 -2.388 3.185 -2.368 2.531 -2.116l-4.106 1.539c-1.194 -0.653 -2.374 -0.466 -2.374 -0.784c0 -0.249 0.228 -0.194 0.194 -0.842c-0.033 -0.622 -0.682 -1.082 -1.295 -1.041c-0.614 -0.004 -1.25 0.467 -1.255 1.115c-0.046 0.653 0.504 1.26 1.153 1.303c0.761 0.113 2.109 -0.348 2.741 0.785c-0.471 0.869 -1.307 0.872 -2.063 0.828c-0.627 -0.036 -1.381 0.144 -1.68 0.76c-0.289 0.591 -0.006 1.432 0.658 1.613c0.67 0.246 1.59 -0.065 1.75 -0.835c0.123 -0.594 -0.298 -0.873 -0.136 -1.089c0.122 -0.163 0.895 -0.068 2.274 -0.687L2.838 2.117C3.4 2.273 4.087 2.268 4.584 1.716L-0.026 -0.027L4.545 -1.803zm-9.154 -0.95c0.647 0.361 0.594 1.342 -0.078 1.532c-0.608 0.212 -1.386 -0.379 -1.192 -1.039c0.114 -0.541 0.827 -0.74 1.27 -0.493zm0.028 4.009c0.675 0.249 0.561 1.392 -0.126 1.546c-0.456 0.158 -1.107 -0.069 -1.153 -0.606c-0.089 -0.653 0.678 -1.242 1.279 -0.94z";

@@ -130,3 +130,3 @@ const scissorsCenter = "M1.803 4.545C2.388 4.06 2.368 3.185 2.116 2.531l-1.539 -4.106c0.653 -1.194 0.466 -2.374 0.784 -2.374c0.249 0 0.194 0.228 0.842 0.194c0.622 -0.033 1.082 -0.682 1.041 -1.295c0.004 -0.614 -0.467 -1.25 -1.115 -1.255c-0.653 -0.046 -1.26 0.504 -1.303 1.153c-0.113 0.761 0.348 2.109 -0.785 2.741c-0.869 -0.471 -0.872 -1.307 -0.828 -2.063c0.036 -0.627 -0.144 -1.381 -0.76 -1.68c-0.591 -0.289 -1.432 -0.006 -1.613 0.658c-0.246 0.67 0.065 1.59 0.835 1.75c0.594 0.123 0.873 -0.298 1.089 -0.136c0.163 0.122 0.068 0.895 0.687 2.274L-2.117 2.838C-2.273 3.4 -2.268 4.087 -1.716 4.584L0.027 -0.026L1.803 4.545zm0.95 -9.154c-0.361 0.647 -1.342 0.594 -1.532 -0.078c-0.212 -0.608 0.379 -1.386 1.039 -1.192c0.541 0.114 0.74 0.827 0.493 1.27zm-4.009 0.028c-0.249 0.675 -1.392 0.561 -1.546 -0.126c-0.158 -0.456 0.069 -1.107 0.606 -1.153c0.653 -0.089 1.242 0.678 0.94 1.279z";

//-- Separation text
if (this._separate === true) {
if (this._separate) {
if (this.page.height > utils.mm2pt(105)) {

@@ -421,5 +421,3 @@ this.fontSize(11);

}
else {
return `${data.name}\n${data.address}\n${countryPrefix}${data.zip} ${data.city}`;
}
return `${data.name}\n${data.address}\n${countryPrefix}${data.zip} ${data.city}`;
}

@@ -426,0 +424,0 @@ _addRectangle(x, y, width, height) {

@@ -34,2 +34,5 @@ import { validateData, cleanData } from "../shared/shared.js";

let paymentPartLineCount = 0;
//-- Background image
this.instance.addRect(0, 0, "100%", "100%")
.fill("#fff");
//-- Vertical line

@@ -36,0 +39,0 @@ this.instance.addLine("62mm", "0mm", "62mm", "105mm")

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

this.addPage();
if (this._autoGenerate === true) {
if (this._autoGenerate) {
this.addQRBill();

@@ -118,3 +118,3 @@ this.end();

//-- Lines
if (this._outlines === true) {
if (this._outlines) {
//-- Horizontal line

@@ -140,3 +140,3 @@ if (this.page.height > utils.mm2pt(105)) {

//-- Scissors
if (this._scissors === true) {
if (this._scissors) {
const scissorsTop = "M4.545 -1.803C4.06 -2.388 3.185 -2.368 2.531 -2.116l-4.106 1.539c-1.194 -0.653 -2.374 -0.466 -2.374 -0.784c0 -0.249 0.228 -0.194 0.194 -0.842c-0.033 -0.622 -0.682 -1.082 -1.295 -1.041c-0.614 -0.004 -1.25 0.467 -1.255 1.115c-0.046 0.653 0.504 1.26 1.153 1.303c0.761 0.113 2.109 -0.348 2.741 0.785c-0.471 0.869 -1.307 0.872 -2.063 0.828c-0.627 -0.036 -1.381 0.144 -1.68 0.76c-0.289 0.591 -0.006 1.432 0.658 1.613c0.67 0.246 1.59 -0.065 1.75 -0.835c0.123 -0.594 -0.298 -0.873 -0.136 -1.089c0.122 -0.163 0.895 -0.068 2.274 -0.687L2.838 2.117C3.4 2.273 4.087 2.268 4.584 1.716L-0.026 -0.027L4.545 -1.803zm-9.154 -0.95c0.647 0.361 0.594 1.342 -0.078 1.532c-0.608 0.212 -1.386 -0.379 -1.192 -1.039c0.114 -0.541 0.827 -0.74 1.27 -0.493zm0.028 4.009c0.675 0.249 0.561 1.392 -0.126 1.546c-0.456 0.158 -1.107 -0.069 -1.153 -0.606c-0.089 -0.653 0.678 -1.242 1.279 -0.94z";

@@ -155,3 +155,3 @@ const scissorsCenter = "M1.803 4.545C2.388 4.06 2.368 3.185 2.116 2.531l-1.539 -4.106c0.653 -1.194 0.466 -2.374 0.784 -2.374c0.249 0 0.194 0.228 0.842 0.194c0.622 -0.033 1.082 -0.682 1.041 -1.295c0.004 -0.614 -0.467 -1.25 -1.115 -1.255c-0.653 -0.046 -1.26 0.504 -1.303 1.153c-0.113 0.761 0.348 2.109 -0.785 2.741c-0.869 -0.471 -0.872 -1.307 -0.828 -2.063c0.036 -0.627 -0.144 -1.381 -0.76 -1.68c-0.591 -0.289 -1.432 -0.006 -1.613 0.658c-0.246 0.67 0.065 1.59 0.835 1.75c0.594 0.123 0.873 -0.298 1.089 -0.136c0.163 0.122 0.068 0.895 0.687 2.274L-2.117 2.838C-2.273 3.4 -2.268 4.087 -1.716 4.584L0.027 -0.026L1.803 4.545zm0.95 -9.154c-0.361 0.647 -1.342 0.594 -1.532 -0.078c-0.212 -0.608 0.379 -1.386 1.039 -1.192c0.541 0.114 0.74 0.827 0.493 1.27zm-4.009 0.028c-0.249 0.675 -1.392 0.561 -1.546 -0.126c-0.158 -0.456 0.069 -1.107 0.606 -1.153c0.653 -0.089 1.242 0.678 0.94 1.279z";

//-- Separation text
if (this._separate === true) {
if (this._separate) {
if (this.page.height > utils.mm2pt(105)) {

@@ -446,5 +446,3 @@ this.fontSize(11);

}
else {
return `${data.name}\n${data.address}\n${countryPrefix}${data.zip} ${data.city}`;
}
return `${data.name}\n${data.address}\n${countryPrefix}${data.zip} ${data.city}`;
}

@@ -451,0 +449,0 @@ _addRectangle(x, y, width, height) {

@@ -59,2 +59,5 @@ "use strict";

let paymentPartLineCount = 0;
//-- Background image
this.instance.addRect(0, 0, "100%", "100%")
.fill("#fff");
//-- Vertical line

@@ -61,0 +64,0 @@ this.instance.addLine("62mm", "0mm", "62mm", "105mm")

@@ -50,3 +50,3 @@ import { ExtendedPDF } from "./extended-pdf.js";

this.addPage();
if (this._autoGenerate === true) {
if (this._autoGenerate) {
this.addQRBill();

@@ -93,3 +93,3 @@ this.end();

//-- Lines
if (this._outlines === true) {
if (this._outlines) {
//-- Horizontal line

@@ -115,3 +115,3 @@ if (this.page.height > utils.mm2pt(105)) {

//-- Scissors
if (this._scissors === true) {
if (this._scissors) {
const scissorsTop = "M4.545 -1.803C4.06 -2.388 3.185 -2.368 2.531 -2.116l-4.106 1.539c-1.194 -0.653 -2.374 -0.466 -2.374 -0.784c0 -0.249 0.228 -0.194 0.194 -0.842c-0.033 -0.622 -0.682 -1.082 -1.295 -1.041c-0.614 -0.004 -1.25 0.467 -1.255 1.115c-0.046 0.653 0.504 1.26 1.153 1.303c0.761 0.113 2.109 -0.348 2.741 0.785c-0.471 0.869 -1.307 0.872 -2.063 0.828c-0.627 -0.036 -1.381 0.144 -1.68 0.76c-0.289 0.591 -0.006 1.432 0.658 1.613c0.67 0.246 1.59 -0.065 1.75 -0.835c0.123 -0.594 -0.298 -0.873 -0.136 -1.089c0.122 -0.163 0.895 -0.068 2.274 -0.687L2.838 2.117C3.4 2.273 4.087 2.268 4.584 1.716L-0.026 -0.027L4.545 -1.803zm-9.154 -0.95c0.647 0.361 0.594 1.342 -0.078 1.532c-0.608 0.212 -1.386 -0.379 -1.192 -1.039c0.114 -0.541 0.827 -0.74 1.27 -0.493zm0.028 4.009c0.675 0.249 0.561 1.392 -0.126 1.546c-0.456 0.158 -1.107 -0.069 -1.153 -0.606c-0.089 -0.653 0.678 -1.242 1.279 -0.94z";

@@ -130,3 +130,3 @@ const scissorsCenter = "M1.803 4.545C2.388 4.06 2.368 3.185 2.116 2.531l-1.539 -4.106c0.653 -1.194 0.466 -2.374 0.784 -2.374c0.249 0 0.194 0.228 0.842 0.194c0.622 -0.033 1.082 -0.682 1.041 -1.295c0.004 -0.614 -0.467 -1.25 -1.115 -1.255c-0.653 -0.046 -1.26 0.504 -1.303 1.153c-0.113 0.761 0.348 2.109 -0.785 2.741c-0.869 -0.471 -0.872 -1.307 -0.828 -2.063c0.036 -0.627 -0.144 -1.381 -0.76 -1.68c-0.591 -0.289 -1.432 -0.006 -1.613 0.658c-0.246 0.67 0.065 1.59 0.835 1.75c0.594 0.123 0.873 -0.298 1.089 -0.136c0.163 0.122 0.068 0.895 0.687 2.274L-2.117 2.838C-2.273 3.4 -2.268 4.087 -1.716 4.584L0.027 -0.026L1.803 4.545zm0.95 -9.154c-0.361 0.647 -1.342 0.594 -1.532 -0.078c-0.212 -0.608 0.379 -1.386 1.039 -1.192c0.541 0.114 0.74 0.827 0.493 1.27zm-4.009 0.028c-0.249 0.675 -1.392 0.561 -1.546 -0.126c-0.158 -0.456 0.069 -1.107 0.606 -1.153c0.653 -0.089 1.242 0.678 0.94 1.279z";

//-- Separation text
if (this._separate === true) {
if (this._separate) {
if (this.page.height > utils.mm2pt(105)) {

@@ -421,5 +421,3 @@ this.fontSize(11);

}
else {
return `${data.name}\n${data.address}\n${countryPrefix}${data.zip} ${data.city}`;
}
return `${data.name}\n${data.address}\n${countryPrefix}${data.zip} ${data.city}`;
}

@@ -426,0 +424,0 @@ _addRectangle(x, y, width, height) {

@@ -34,2 +34,5 @@ import { validateData, cleanData } from "../shared/shared.js";

let paymentPartLineCount = 0;
//-- Background image
this.instance.addRect(0, 0, "100%", "100%")
.fill("#fff");
//-- Vertical line

@@ -36,0 +39,0 @@ this.instance.addLine("62mm", "0mm", "62mm", "105mm")

{
"name": "swissqrbill",
"version": "3.1.5-beta.0",
"version": "3.1.5",
"description": "Swiss QR Bill generation in Node.js and browsers",

@@ -152,10 +152,10 @@ "main": "./lib/node/cjs/node/index.js",

"devDependencies": {
"@schoero/eslint-config": "^1.1.0",
"@schoero/eslint-config": "^1.4.0",
"@types/blob-stream": "^0.1.30",
"@types/node": "^17.0.8",
"@types/node": "^17.0.19",
"@types/qrcode": "^1.4.2",
"@types/qrcode-svg": "^1.1.1",
"@types/svg-parser": "^2.0.3",
"@typescript-eslint/eslint-plugin": "^5.9.1",
"@typescript-eslint/parser": "^5.9.1",
"@typescript-eslint/eslint-plugin": "^5.12.1",
"@typescript-eslint/parser": "^5.12.1",
"assert": "^2.0.0",

@@ -165,3 +165,3 @@ "brfs": "^2.0.2",

"buffer": "^6.0.3",
"eslint": "^8.6.0",
"eslint": "^8.9.0",
"process": "^0.11.10",

@@ -171,6 +171,6 @@ "readable-stream": "^3.6.0",

"ts-loader": "^9.2.6",
"typescript": "^4.5.4",
"typescript": "^4.5.5",
"util": "^0.12.4",
"webpack": "^5.65.0",
"webpack-cli": "^4.9.1"
"webpack": "^5.69.1",
"webpack-cli": "^4.9.2"
},

@@ -177,0 +177,0 @@ "dependencies": {

@@ -35,3 +35,3 @@ <div align="center">

With SwissQRBill you can easily generate the new QR Code payment slips in Node.js and the browser. The new QR Code payment slips were introduced in Switzerland on June 30th, 2020 and should gradually replace the current payment slips. In addition to the payment section, you can generate a complete invoice with SwissQRBill by inserting your own content above the payment section.
With SwissQRBill you can easily generate the new QR Code payment slips in Node.js and the browser. The new QR Code payment slips were introduced in Switzerland on June 30th, 2020 and should replace the current payment slips until September 30, 2022. In addition to the payment section, you can [generate a complete invoice](#further-informations) with SwissQRBill by inserting your own content above the payment section.

@@ -41,3 +41,3 @@ <br/>

[<img src="https://raw.githubusercontent.com/schoero/SwissQRBill/master/assets/qrbill.png">](https://github.com/schoero/SwissQRBill/blob/master/assets/qrbill.pdf)
[<img src="https://raw.githubusercontent.com/schoero/SwissQRBill/master/assets/qrbill.svg">](https://github.com/schoero/SwissQRBill/blob/master/assets/qrbill.pdf)

@@ -52,3 +52,2 @@

* [Installation](#installation)
* [Migrating from v2.x](#migrating-from-v2x)
* [Importing the library](#importing-the-library)

@@ -79,18 +78,8 @@ * [Quick start](#quick-start)

```sh
npm i swissqrbill
```
npm i swissqrbill --save
```
<br/>
## Migrating from v2.x
If you want to migrate from v2.x to v3.x, there are mainly two things that need to be changed:
- `mmToPoints()` has to be renamed to `mm2pt()`
- the `data` field `houseNumber` has to be renamed to `buildingNumber`
Other than that, there are now ES module exports. Please take a look at following section to check if you can improve the way you import the library.
<br/>
## Importing the library

@@ -165,3 +154,4 @@

name: "Robert Schneider AG",
address: "Rue du Lac 1268",
address: "Rue du Lac",
buildingNumber: "1268",
zip: 2501,

@@ -174,3 +164,4 @@ city: "Biel",

name: "Pia-Maria Rutschmann-Schnyder",
address: "Grosse Marktgasse 28",
address: "Grosse Marktgasse",
buildingNumber: "28",
zip: 9400,

@@ -177,0 +168,0 @@ city: "Rorschach",

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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