Socket
Socket
Sign inDemoInstall

qr-image-color

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.2.0 to 3.2.1

lib/index.d.ts

2

lib/crc32.js

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

for (var i = 0; i < l; i++) {
c = update(c, new Buffer(arguments[i]));
c = update(c, new Buffer.from(arguments[i]));
}

@@ -44,0 +44,0 @@ c = (c ^ -1) >>> 0;

@@ -6,3 +6,3 @@ 'use strict';

for (var n = 0; n < 256; n++) {
var c = crc_table[n] = new Buffer(4);
var c = crc_table[n] = new Buffer.alloc(4);
c.writeUInt32BE(n, 0);

@@ -36,7 +36,7 @@

var l = arguments.length;
var c = new Buffer(4);
var c = new Buffer.alloc(4);
c.fill(0xff);
for (var i = 0; i < l; i++) {
update(c, new Buffer(arguments[i]));
update(c, new Buffer.from(arguments[i]));
}

@@ -43,0 +43,0 @@

@@ -140,7 +140,7 @@ "use strict";

str = '' + data;
data = new Buffer(str);
data = new Buffer.from(str);
} else if (Buffer.isBuffer(data)) {
str = data.toString();
} else if (Array.isArray(data)) {
data = new Buffer(data);
data = new Buffer.from(data);
str = data.toString();

@@ -147,0 +147,0 @@ } else {

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

}
return new Buffer(msg);
return new Buffer.from(msg);
}

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

var matrix = [];
var zeros = new Buffer(N);
var zeros = new Buffer.alloc(N);
zeros.fill(0);

@@ -10,0 +10,0 @@ zeros = [].slice.call(zeros);

@@ -0,0 +0,0 @@ "use strict";

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

function fillTemplate(message, template) {
var blocks = new Buffer(template.data_len);
var blocks = new Buffer.alloc(template.data_len);
blocks.fill(0);

@@ -132,0 +132,0 @@

{
"name": "qr-image-color",
"version": "3.2.0",
"version": "3.2.1",
"description": "QR Code generator (png, svg, pdf, eps) with color and transparency support",
"homepage": "https://github.com/bockoblur/qr-image-color",
"keywords": [ "qrcode", "qr code", "qr", "png", "svg", "image", "color", "transparency" ],
"keywords": [
"qrcode",
"qr code",
"qr",
"png",
"svg",
"image",
"color",
"transparency"
],
"author": {

@@ -18,2 +27,3 @@ "name": "Slobodan Babić",

"main": "./lib/qr.js",
"types": "./lib/index.d.ts",
"scripts": {

@@ -20,0 +30,0 @@ "test": "./tests/testcolors.js"

qr-image-color
========
<!-- [![npm version](https://badge.fury.io/js/qr-image-color.svg)](https://badge.fury.io/js/qr-image-color) -->
[![npm version](https://badge.fury.io/js/qr-image-color.svg)](https://badge.fury.io/js/qr-image-color)

@@ -49,3 +49,3 @@ This is a fork of awesome [alexeyten's](https://github.com/alexeyten/qr-image) qr-image generator.

[1] **NOTE:** Generated QR-codes are *Indexed Color* PNG files.
[1] **NOTE:** Generated QR-codes are *Indexed Color* PNG files. See note about `customize` option below.

@@ -60,3 +60,3 @@ [2] No attempt has been made to use calibrated conversion from CMYK to RGB, so if you use CMYK colors in `SVG` or `PNG`, do not expect prepress-quality conversion. If you need precise CMYK color control, use `PDF` or `EPS` files, since they have native CMYK support.

```javascript
var qr = require('qr-image');
var qr = require('qr-image-color');

@@ -84,4 +84,2 @@ var qr_svg = qr.image('I love Default QR (with black/transparent)!', { type: 'svg' });

`qr = require('qr-image')`
### Methods

@@ -104,3 +102,3 @@

* `margin` — white space around QR image in modules. Default `4` for `png` and `1` for others.
* `customize` (only png) — function to customize qr bitmap before encoding to PNG.
* `customize` (only png) — function to customize qr bitmap before encoding to PNG. **We are now using Index Color PNG instead of grayscale, so using this option will behave different**
* `parse_url` (experimental, default `false`) — try to optimize QR-code for URLs.

@@ -107,0 +105,0 @@ * **NEW options**

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc