npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@qrcodesdk/node

v0.0.1

Published

@qrcodesdk/node adds renderers that depend on Node.js APIs or server-side packages. Use it with `@qrcodesdk/core` when your output needs to be PNG bytes.

Readme

@qrcodesdk/node

Open @qrcodesdk/node on npmx.dev @qrcodesdk/node version @qrcodesdk/node install size @qrcodesdk/node download/mo @qrcodesdk/node Source code

Node.js renderers for QRCodeSDK. Use this package with @qrcodesdk/core when you need a PNG Buffer for files, HTTP responses, downloads, email attachments, or other server-side integrations.

Runtime requirements

@qrcodesdk/node requires Node.js 22.0.0 or newer. Packed consumers are verified in CI on Node 22.0.0 and the latest Node 24.x release. Installation through another package manager does not mean that the package is verified under that package manager's JavaScript runtime.

Install

npm install @qrcodesdk/core @qrcodesdk/node
pnpm add @qrcodesdk/core @qrcodesdk/node

vp

vp add @qrcodesdk/core @qrcodesdk/node

deno

deno add @qrcodesdk/core @qrcodesdk/node

bun

bun add @qrcodesdk/core @qrcodesdk/node

yarn

yarn add @qrcodesdk/core @qrcodesdk/node

Render PNG output

import {qrcode} from '@qrcodesdk/core';
import {QRCodePNGRenderer} from '@qrcodesdk/node';

const png: Buffer = qrcode('https://qrcodesdk.dev').render(
  QRCodePNGRenderer({
    size: 8,
    margin: 4,
    colors: {
      colorDark: '#111827',
      colorLight: '#ffffff',
    },
    dotsOptions: {type: 'rounded'},
    cornersSquareOptions: {type: 'extra-rounded', color: '#7c3aed'},
    cornersDotOptions: {type: 'dot'},
  }),
);

QRCodePNGRenderer() returns a Node.js Buffer containing a square, fully opaque PNG image.

Options

| Option | Type | Default | Description | | ----------------------- | ---------------------------- | -----------------: | ----------------------------------------- | | size | number | 5 | Pixel size of each QR module. | | margin | number | 4 | Quiet-zone width in modules. | | colors.colorDark | string | '#000000' | Dark module color. | | colors.colorLight | string | '#ffffff' | Background color. | | dotsOptions | QRCodeDotsOptions | {type: 'square'} | Ordinary module shape and optional color. | | cornersSquareOptions | QRCodeCornersSquareOptions | {type: 'square'} | Finder-ring shape and optional color. | | cornersDotOptions | QRCodeCornersDotOptions | {type: 'square'} | Finder-center shape and optional color. | | image.source | Buffer | undefined | PNG bytes loaded by the caller. | | image.size | number | 0.4 | Relative centered image-box size. | | image.padding | number | 1 | Clear padding in QR modules. | | image.clearBackground | boolean | true | Clears modules behind the image. |

Colors must be six-digit hex values such as #111827. size must be a positive safe integer and margin must be a non-negative safe integer.

All feature colors inherit colors.colorDark when omitted. Curves are rendered with deterministic subpixel coverage and blended into the opaque background.

Prepared PNG images

Load PNG bytes before calling the renderer:

import {readFile} from 'node:fs/promises';

const logo = await readFile('./logo.png');
const png = qrcode('https://qrcodesdk.dev')
  .errorCorrection('H')
  .render(QRCodePNGRenderer({image: {source: logo, size: 0.3}}));

The renderer synchronously decodes and composites the provided buffer but performs no filesystem or network I/O. Only PNG source bytes are accepted.

Save to disk

import {writeFile} from 'node:fs/promises';

import {qrcode} from '@qrcodesdk/core';
import {QRCodePNGRenderer} from '@qrcodesdk/node';

const png = qrcode('https://qrcodesdk.dev').render(QRCodePNGRenderer());

await writeFile('qrcode.png', png);

Send an HTTP response

The returned buffer can be sent from any Node.js HTTP framework as image/png:

import {createServer} from 'node:http';

import {qrcode} from '@qrcodesdk/core';
import {QRCodePNGRenderer} from '@qrcodesdk/node';

createServer((_request, response) => {
  const png = qrcode('https://qrcodesdk.dev').render(QRCodePNGRenderer());

  response.writeHead(200, {
    'Content-Length': png.length,
    'Content-Type': 'image/png',
  });
  response.end(png);
}).listen(3000);

Package boundary

@qrcodesdk/node provides Node-specific renderers and does not replace @qrcodesdk/core. The core package still provides qrcode(), matrix generation, builder options, and shared styling normalization.

Public API

import {
  type QRCodePNGImageOptions,
  QRCodePNGRenderer,
  type QRCodePNGRendererOptions,
} from '@qrcodesdk/node';

Documentation