Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

node-qrcode

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-qrcode

generate qrcode by nodejs but not depend on node-canvas.

  • 0.0.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
33
decreased by-25%
Maintainers
1
Weekly downloads
 
Created
Source

node-qrcode

generate qrcode by node.js but not depend on node-canvas.

why

Because of the deep dependency, qrcode is too hard to use.

qrcode's dependency: qrcode -> node-canvas -> node -> Cairo -> x11.

So the node-qrcode is dependent on browser(webdriver/phantomjs) to draw qrcode canvas, It is very easy to use :)

Usage:

tnpm i node-qrcode --save

var qrcode = require('node-qrcode');

qrcode({
  text: 'http://weibo.com',
  size: 200,
  qrcodePath: './qrcode.png',
  browser: 'chrome'
}).then(function(qrcodePath) {
  console.log(qrcodePath);  // balabala/node-qrcode/qrcode.png
});

API

qrcode(option)

  • option.text: required, the qrcode content
  • option.size: option, default 150, qrcode size
  • option.qrcodePath: required, save the qrcode png
  • option.browser: option, default phanpmjs, values: chrome/phantomjs, chrome is faster but not support linux

License

MIT © 2015 sobear

Keywords

FAQs

Package last updated on 07 Dec 2015

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc