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

@byted/qrcode-generator

Package Overview
Dependencies
Maintainers
13
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@byted/qrcode-generator

A tool for generating qrcode. Support to render canvas, display image, download image file and execute callback, upload image file and execute callback, add customized picture to the center of the qrcode and etc.

  • 1.0.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
13
Weekly downloads
 
Created
Source

byted-qrcode-generator

A tool for generating qrcode. Support to render canvas, display image, download image file and execute callback, upload image file and execute callback, add customized picture to the center of the qrcode and etc.

Based on https://www.npmjs.com/package/qrcode

API

完整支持https://www.npmjs.com/package/qrcode 的API

基于上述,添加以下API

  • render(id, text, option)

渲染生成二维码及对应Blob对象

@param id Canvas画布id

@param text 二维码展示内容

@param option 二维码渲染配置对象(参见https://www.npmjs.com/package/qrcode)

@return new Promise 支持回调函数

  • upload(id, url)

上传二维码图片

@param id Canvas画布id

@param url 二维码上传地址(非跨域)

@return new Promise 支持回调函数

  • exportImage(id, filename)

导出二维码图片

@param id Canvas画布id

@param filename 二维码文件名

@return new Promise 支持回调函数

  • getBlobInstance(id)

获取二维码Blob对象实例

@param id Canvas画布id

@return blobInstance or {}

  • getCanvasInstance(id)

获取二维码Canvas对象实例

@param id Canvas画布id

@return canvasInstance or {}

Keywords

FAQs

Package last updated on 29 Sep 2017

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