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

@types/qr-image

v3.2.10

Published

TypeScript definitions for qr-image

Readme

Installation

npm install --save @types/qr-image

Summary

This package contains type definitions for qr-image (https://github.com/alexeyten/qr-image).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/qr-image.

index.d.ts

/// <reference types="node" />

/**
 * error correction level. One of L, M, Q, H. Default M.
 */
export type ec_level = "L" | "M" | "Q" | "H";

/** @default 'png' */
export type image_type = "png" | "svg" | "pdf" | "eps";

export interface Bitmap {
    /**
     * width (and height) of resulting image in pixels
     */
    size: number;
    /**
     * @summary
     * Buffer with image data. It's a linear representation
     * of image in format:
     *
     * @example
     * <00> <xx> <xx> ..        <xx>
     * <00> <xx> <xx> ..        <xx>
     * ..
     * <00> <xx> <xx> ..        <xx>
     * ^    | size number of bytes |
     * \ do not modify. Must be 00
     *
     * @description
     * Each `<xx>` is a pixel of image.
     * It's value `0` — black, `255` — white, everything between are shades of gray.
     */
    data: Buffer;
}

export interface SvgObject {
    size: number;
    path: string;
}

export interface Options {
    // error correction level. One of L, M, Q, H. Default M.
    ec_level?: ec_level | undefined;
    // image type. Possible values png(default), svg, pdf and eps.
    type?: image_type | undefined;
    // (png and svg only) for png and undefined for svg.-(png and svg only) — size of one module in pixels.
    size?: number | undefined;
    // (only png)for png and 1 for others.-white space around QR image in modules.
    margin?: number | undefined;
    // (experimental, default false) try to optimize QR-code for URLs.
    parse_url?: boolean | undefined;
    /**
     * (only png) — function to customize qr bitmap before encoding to PNG
     */
    customize?: ((bitmap: Bitmap) => void) | undefined;
}

export function image(text: string, level?: ec_level): NodeJS.ReadableStream;
export function image(text: string, options?: Options): NodeJS.ReadableStream;

export function imageSync(text: string, level?: ec_level): Buffer;
export function imageSync(text: string, options?: Options): string | Buffer;

export function svgObject(text: string, level?: ec_level): SvgObject;
export function svgObject(text: string, options?: Options): SvgObject;

export function matrix(text: string, level?: ec_level): (0 | 1)[][];

Additional Details

  • Last updated: Sun, 08 Mar 2026 02:57:42 GMT
  • Dependencies: @types/node

Credits

These definitions were written by taoqf.