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

qr-cairo

v0.0.8

Published

Node library for generating qr code images based on cairo library

Downloads

16

Readme

========================= Qr Code genartor for node

Another Qr library for nodejs, but this one you could customize more things on you Qr code result, (still needs some work), the current version support a lot of stuff like changing background and code color.

This library is based on the native Cairo library and libqrencode library, so as requirements you should had this two libraries on your OS.

You can get Cairo library from here http://www.cairographics.org/download/

And libqrencode from here https://fukuchi.org/works/qrencode/

Installation

To install qr-cairo you can download the library and install easily with npm command

npm install qr-cairo

Usage

The code below show a basic example of generating an image with Qr code, the genereted code will had as default, transparent background color, black filling color and the correction level by default is low.

var qr_cairo = require('qr-cairo');

// Qr without options
qr_cairo.save('http://aminekabab.me/blog', 'test1.png');

Advanced Usage

Currently qr-cairo has one method that generate the qr image

qr_cairo.save(value, path [, options])

value is the message that you want to encode as Qr code

path the path where you want to save the generated image

option JSON object that can contain the following parameters

option.back_color the background color in hexadecimal format (default color is transparent)

option.fill_color code drawing color (default : #000000)

option.ec_level error correction level ('L' : LOW, 'M' : MEDIUM, 'Q' : QUALITY, 'H', HIGH)

option.box_size the box size in pixel in the qrcode

var qr_cairo = require('qr-cairo');

// Qr with options 
var options = {'ec_level': 'l', 'box_size': '20', 'back_color': '#ee4444', 'fill_color': '#222200'};
qr_cairo.save("Amine", "test2.png", options);