Socket
Socket
Sign inDemoInstall

swissqrbill

Package Overview
Dependencies
101
Maintainers
1
Versions
66
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.1.0 to 2.2.0

7

CHANGELOG.md
# Change Log
# [v2.2.0](https://github.com/schoero/swissqrbill/compare/v2.1.0...v2.2.0) - 20.01.2021
* Switched from `fs.WriteStream` to `stream.Writable` in order to provide more streaming flexibility.
# [v2.1.0](https://github.com/schoero/swissqrbill/compare/v2.0.3...v2.1.0) - 15.12.2020
* Changed the implemented QR code library to fix an issue that caused QR code scanning to fail on some QR readers.
* Added [utility functions](https://github.com/schoero/SwissQRBill/blob/master/doc/api.md#swissqrbillutils) to simplify the creation of QR bills
* Added additional QR-Reference validation
* Added [utility functions](https://github.com/schoero/SwissQRBill/blob/master/doc/api.md#swissqrbillutils) to simplify the creation of QR bills.
* Added additional QR-Reference validation.

@@ -9,0 +12,0 @@ # [v2.0.3](https://github.com/schoero/swissqrbill/compare/v2.0.2...v2.0.3) - 09.12.2020

/// <reference types="node" />
import fs from "fs";
import stream from "stream";
import * as SwissQRBill_ from "./swissqrbill";

@@ -18,9 +18,9 @@ declare module SwissQRBill {

constructor(data: data, outputPath: string, options?: options);
constructor(data: data, writeableStream: fs.WriteStream, options?: options);
constructor(data: data, writeableStream: stream.Writable, options?: options);
constructor(data: data, outputPath: string, options?: options, callback?: Function);
constructor(data: data, writeableStream: fs.WriteStream, options?: options, callback?: Function);
constructor(data: data, writeableStream: stream.Writable, options?: options, callback?: Function);
constructor(data: data, outputPath: string, callback?: Function);
constructor(data: data, writeableStream: fs.WriteStream, callback?: Function);
constructor(data: data, writeableStream: stream.Writable, callback?: Function);
}
}
export = SwissQRBill;

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

width: utils.mmToPoints(210),
align: "center",
align: "center"
});

@@ -162,3 +162,3 @@ }

width: utils.mmToPoints(52),
align: "left",
align: "left"
});

@@ -242,3 +242,3 @@ this.fontSize(6);

width: utils.mmToPoints(52),
align: "right",
align: "right"
});

@@ -251,3 +251,3 @@ }

width: utils.mmToPoints(51),
align: "left",
align: "left"
});

@@ -254,0 +254,0 @@ this._generateQRCode();

@@ -85,11 +85,11 @@ "use strict";

const amountArray = amountString.split(".");
let formatedAmountWithoutDecimals = "";
let formattedAmountWithoutDecimals = "";
for (let x = amountArray[0].length - 1, i = 1; x >= 0; x--, i++) {
formatedAmountWithoutDecimals = amountArray[0][x] + formatedAmountWithoutDecimals;
formattedAmountWithoutDecimals = amountArray[0][x] + formattedAmountWithoutDecimals;
if (i === 3) {
formatedAmountWithoutDecimals = " " + formatedAmountWithoutDecimals;
formattedAmountWithoutDecimals = " " + formattedAmountWithoutDecimals;
i = 0;
}
}
return formatedAmountWithoutDecimals + "." + amountArray[1];
return formattedAmountWithoutDecimals + "." + amountArray[1];
}

@@ -96,0 +96,0 @@ exports.formatAmount = formatAmount;

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

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

"@types/blob-stream": "^0.1.30",
"@types/iban": "0.0.30",
"@types/iban": "0.0.32",
"@types/node": "^14.0.0",

@@ -48,0 +48,0 @@ "@types/qrcode": "^1.3.4",

@@ -1,21 +0,32 @@

# SwissQRBill
<a href="https://github.com/schoero/SwissQRBill/blob/master/LICENSE">
<img alt="MIT License" src="https://img.shields.io/npm/l/swissqrbill?color=brightgreen&style=flat-square">
</a>
<a href="https://www.npmjs.com/package/swissqrbill">
<img alt="Version" src="https://img.shields.io/npm/v/swissqrbill?color=brightgreen&style=flat-square">
</a>
<a href="https://github.com/schoero/SwissQRBill/issues">
<img alt="Issues" src="https://img.shields.io/github/issues-raw/schoero/swissqrbill?style=flat-square">
</a>
<a href="https://www.npmjs.com/package/swissqrbill">
<img alt="Dependencies" src="https://img.shields.io/david/schoero/swissqrbill?style=flat-square">
</a>
<a href="https://www.npmjs.com/package/swissqrbill">
<img alt="Downloads" src="https://img.shields.io/npm/dw/swissqrbill?style=flat-square">
</a>
<a href="https://github.com/schoero/SwissQRBill/actions?query=workflow%3ACI">
<img alt="CI" src="https://img.shields.io/github/workflow/status/schoero/SwissQRBill/CI?style=flat-square">
</a>
<div align="center">
<img alt="SwissQRBill" src="https://raw.githubusercontent.com/schoero/SwissQRBill/master/assets/swissqrbill-logo.svg">
</div>
---
<div align="center">
<a href="https://github.com/schoero/SwissQRBill/blob/master/LICENSE">
<img alt="MIT License" src="https://img.shields.io/npm/l/swissqrbill?color=brightgreen&style=flat-square">
</a>
<a href="https://www.npmjs.com/package/swissqrbill">
<img alt="Version" src="https://img.shields.io/npm/v/swissqrbill?color=brightgreen&style=flat-square">
</a>
<a href="https://github.com/schoero/SwissQRBill/issues">
<img alt="Issues" src="https://img.shields.io/github/issues-raw/schoero/swissqrbill?style=flat-square">
</a>
<a href="https://www.npmjs.com/package/swissqrbill">
<img alt="Dependencies" src="https://img.shields.io/david/schoero/swissqrbill?style=flat-square">
</a>
<a href="https://www.npmjs.com/package/swissqrbill">
<img alt="Downloads" src="https://img.shields.io/npm/dw/swissqrbill?style=flat-square">
</a>
<a href="https://github.com/schoero/SwissQRBill/stargazers">
<img alt="Downloads" src="https://img.shields.io/github/stars/schoero/SwissQRBill?color=brightgreen&style=flat-square">
</a>
<a href="https://github.com/schoero/SwissQRBill/actions?query=workflow%3ACI">
<img alt="CI" src="https://img.shields.io/github/workflow/status/schoero/SwissQRBill/CI?style=flat-square">
</a>
</div>
---
<br/>

@@ -100,6 +111,6 @@ <br/>

To use SwissQRBill inside browsers, you have to pass a writeableStream in the second parameter, instead of the output path. To create a writeableStream in the browser you can use the built in `SwissQRBill.blobStream()` method.
To use SwissQRBill inside browsers, you have to pass a writeableStream in the second parameter, instead of the output path. To create a writeableStream in the browser you can use the built in `SwissQRBill.BlobStream()` function.
```js
const stream = SwissQRBill.blobStream();
const stream = new SwissQRBill.BlobStream();

@@ -106,0 +117,0 @@ const pdf = new SwissQRBill.PDF(data, stream);

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

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc