
Research
Security News
Malicious npm Packages Target BSC and Ethereum to Drain Crypto Wallets
Socket uncovered four malicious npm packages that exfiltrate up to 85% of a victim’s Ethereum or BSC wallet using obfuscated JavaScript.
Lean QR is a lightweight yet fully-featured library for generating QR Codes. It runs in NodeJS and all recent browsers, and includes wrapper components for React, Preact, and native Web Components. Under 4kB compressed.
You can see it in action online, or try it from the terminal:
npx lean-qr 'MY MESSAGE HERE'
See the Quickstart documentation for NodeJS / Browser / React / Preact / Web Components / CLI usage.
npm install --save lean-qr
<canvas id="my-qr-code"></canvas>
<style>
#my-qr-code {
image-rendering: pixelated;
width: 100%;
}
</style>
import { generate } from 'lean-qr';
const qrCode = generate('LEAN-QR LIBRARY');
qrCode.toCanvas(document.getElementById('my-qr-code'));
There is a bug in JSDOM which prevents this class being available in tests. This issue only affects JSDOM, and can be fixed with:
import { TextEncoder, TextDecoder } from 'node:util';
global.TextEncoder = TextEncoder;
global.TextDecoder = TextDecoder;
You can put this in the test file or in Jest's setupFilesAfterEnv
config. You
should not put this in your application code.
FAQs
minimal QR code generation
The npm package lean-qr receives a total of 12,352 weekly downloads. As such, lean-qr popularity was classified as popular.
We found that lean-qr demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
Research
Security News
Socket uncovered four malicious npm packages that exfiltrate up to 85% of a victim’s Ethereum or BSC wallet using obfuscated JavaScript.
Security News
TC39 advances 9 JavaScript proposals, including Array.fromAsync, Error.isError, and Explicit Resource Management, which are now headed into the ECMAScript spec.
Security News
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.