Socket
Socket
Sign inDemoInstall

react-qrcode

Package Overview
Dependencies
33
Maintainers
2
Versions
17
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.3.5 to 0.3.6

src/index.ts

1

lib/qrcode.d.ts

@@ -0,1 +1,2 @@

/// <reference types="web" />
import { FC, HTMLAttributes } from 'react';

@@ -2,0 +3,0 @@ import { QRCodeOptions } from './types.js';

33

lib/qrcode.js

@@ -1,20 +0,19 @@

import { __rest } from "tslib";
import { createElement } from 'react';
import { useQRCode } from './use-qrcode.js';
export const QRCode = (_a) => {
var { color, errorCorrectionLevel, margin, maskPattern, quality, scale, toSJISFunc, type, value, version, width } = _a, props = __rest(_a, ["color", "errorCorrectionLevel", "margin", "maskPattern", "quality", "scale", "toSJISFunc", "type", "value", "version", "width"]);
return createElement('img', Object.assign(Object.assign({}, props), { src: useQRCode({
color,
errorCorrectionLevel,
margin,
maskPattern,
quality,
scale,
toSJISFunc,
type,
value,
version,
width,
}) }));
};
export const QRCode = ({ color, errorCorrectionLevel, margin, maskPattern, quality, scale, toSJISFunc, type, value, version, width, ...props }) => createElement('img', {
...props,
src: useQRCode({
color,
errorCorrectionLevel,
margin,
maskPattern,
quality,
scale,
toSJISFunc,
type,
value,
version,
width,
}),
});
//# sourceMappingURL=qrcode.js.map

@@ -11,3 +11,2 @@ export const LEVELS = [

];
// eslint-disable-next-line @typescript-eslint/no-magic-numbers
export const MASK_PATTERNS = [0, 1, 2, 3, 4, 5, 6, 7];

@@ -14,0 +13,0 @@ export const MODES = [

@@ -1,2 +0,1 @@

import { __rest } from "tslib";
import QRCode from 'qrcode';

@@ -12,3 +11,3 @@ import { useEffect, useState } from 'react';

if (!isValue) {
const { quality } = valueOrOptions, props = __rest(valueOrOptions, ["quality"]);
const { quality, ...props } = valueOrOptions;
options = Object.assign(props, {

@@ -23,3 +22,2 @@ renderOptions: {

}
// eslint-disable-next-line @typescript-eslint/no-floating-promises
QRCode.toDataURL(value, options).then(setDataURL);

@@ -26,0 +24,0 @@ }, [valueOrOptions]);

{
"name": "react-qrcode",
"version": "0.3.5",
"version": "0.3.6",
"type": "module",

@@ -9,33 +9,2 @@ "description": "🤳 A React component for QR code generation with `qrcode`",

"author": "JounQin (https://www.1stG.me) <admin@1stg.me>",
"donate": {
"recipients": [
{
"name": "unts",
"platform": "opencollective",
"address": "https://opencollective.com/unts",
"weight": 60
},
{
"name": "rxts",
"platform": "opencollective",
"address": "https://opencollective.com/rxts",
"weight": 20
},
{
"name": "1stG",
"email": "i@1stg.me",
"weight": 20,
"platforms": [
{
"platform": "opencollective",
"address": "https://opencollective.com/1stG"
},
{
"platform": "patreon",
"address": "https://www.patreon.com/1stG"
}
]
}
]
},
"funding": "https://opencollective.com/rxts",

@@ -52,3 +21,4 @@ "license": "MIT",

"files": [
"lib"
"lib",
"src"
],

@@ -64,5 +34,2 @@ "keywords": [

},
"dependencies": {
"tslib": "^2.4.0"
},
"publishConfig": {

@@ -69,0 +36,0 @@ "access": "public"

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc