
Security News
Vite Releases Technical Preview of Rolldown-Vite, a Rust-Based Bundler
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
TinyQRC is a lightweight and simple QR code generation library. Generate beautiful QR codes quickly and easily with zero dependencies.
npm install tinyqrc
# or
yarn add tinyqrc
# or
pnpm add tinyqrc
# or
bun add tinyqrc
import { generateSVG } from "tinyqrc";
// Generate a QR code
const svg = await generateSVG({
value: "https://example.com",
size: 256,
});
Generates a QR code as an SVG string.
type Options = {
value: string; // Content to encode
size?: number; // Size in pixels (default: 128)
level?: "L" | "M" | "Q" | "H"; // Error correction level (default: "L")
bgColor?: string; // Background color (default: "#FFFFFF")
fgColor?: string; // Foreground color (default: "#000000")
margin?: number; // Margin around QR code (default: 2)
imageSettings?: {
src: string; // URL of the image to embed
height?: number; // Image height
width?: number; // Image width
x?: number; // X position
y?: number; // Y position
excavate?: boolean; // Whether to clear QR code modules under the image
};
// Any additional SVG attributes are passed through to the root SVG element
};
L
: Low (7% of data can be restored)M
: Medium (15% of data can be restored)Q
: Quartile (25% of data can be restored)H
: High (30% of data can be restored)Note: When using imageSettings
with excavate: true
, the error correction level will automatically be increased to at least 'Q' to ensure better scannability.
Code Gen is based on nayuki/QR-Code-generator with modifications.
MIT License.
FAQs
A tiny QR code generator, written in TypeScript.
The npm package tinyqrc receives a total of 2 weekly downloads. As such, tinyqrc popularity was classified as not popular.
We found that tinyqrc 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.
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.
Research
Security News
A malicious npm typosquat uses remote commands to silently delete entire project directories after a single mistyped install.
Research
Security News
Malicious PyPI package semantic-types steals Solana private keys via transitive dependency installs using monkey patching and blockchain exfiltration.