
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
An efficient and lightweight QR Code WebComponent integrated with Rust wasm library.
An efficient and lightweight QR Code WebComponent integrated with Rust wasm library.
You can install wc-qrcode
with npm, or just get started quickly with CDN.
To install from npm, open terminal in your project folder and run:
npm install wc-qrcode
After the package is installed, then you can import the qrcode webcomponent into you code:
import 'wc-qrcode';
window.onload = function() {
let qrElement = document.createElement('qr-code');
qrElement.setAttribute('text', 'https://example.org');
qrElement.setAttribute('size', '6');
document.body.appendChild(qrElement);
}
There is jsDelivr
CDN available for quickly integrated with your web page.
https://cdn.jsdelivr.net/npm/wc-qrcode@0.1.6
or
<script src="https://cdn.jsdelivr.net/npm/wc-qrcode@0.1.6"></script>
<html>
<head>
<!-- Load QR WebComponent library -->
<script src="https://cdn.jsdelivr.net/npm/wc-qrcode@0.1.6"></script>
<!-- End Load -->
</head>
<body>
<!-- Using "qr-code" html tag to generate QR Code -->
<qr-code
text="https://github.com/yishiashia/wc-qrcode"
size="6"
></qr-code>
</body>
</html>
String
type. The data of QR Code.
Number
type. The QR code image size (multiply by 16px).
String
type. The alt description text of the generated qrcode image.
Property | Type | Description |
---|---|---|
text | String | The data string to generate QR code. |
size | Integer | The QR Code image size (width and height would be the size multiply by 16px). |
alt | String | The alt description text of the generated qrcode image. |
You can update the qrcode component by setting its properties.
For example:
const qrElement = document.getElementsByTagName("qr-code")[0];
if (qrElement !== undefined) {
qrElement.text = "https://www.example.org";
qrElement.alt = "URL of example.org";
qrElement.size = 10;
}
FAQs
An efficient and lightweight QR Code WebComponent integrated with Rust wasm library.
The npm package wc-qrcode receives a total of 1 weekly downloads. As such, wc-qrcode popularity was classified as not popular.
We found that wc-qrcode demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.