Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@fourdim/wechat-miniapp-qrcode
Advanced tools
Dynamically generated QR codes for Wechat Miniapps.
Dynamically generated QR codes for Wechat Miniapps.
Notice: This library is only compatible with the WeChat mini program framework as it uses the WeChat native APIs.
If you are looking for the QR code generator for modern browsers, you may refer to lrsjng/kjua.
<!-- canvas.wxml -->
<canvas type="2d" id="myCanvas"></canvas>
<!-- need 2d type -->
<!-- id but not canvas-id -->
// canvas.js
import genQrcode from '@fourdim/wechat-miniapp-qrcode'
const query = wx.createSelectorQuery()
query.select('#myCanvas')
.fields({ node: true, size: true })
.exec((res) => {
genQrcode(res[0].node, {text: 'Hello'})
})
The available options and their default values are:
{
// render method: 'canvas' or 'image'
render: 'canvas',
// render pixel-perfect lines
crisp: true,
// minimum version: 1..40
// refer to https://kazuhikoarase.github.io/qrcode-generator/js/demo/ for more
minVersion: 1,
// error correction level: 'L', 'M', 'Q' or 'H'
ecLevel: 'L',
// size in pixel
size: 200,
// pixel-ratio, null for wx.getSystemInfoSync().pixelRatio
ratio: null,
// code color
fill: '#333',
// background color
back: '#fff',
// content
text: 'no text',
// roundend corners in pc: 0..100
rounded: 0,
// quiet zone in modules
quiet: 0,
// modes: 'plain', 'label' or 'image'
mode: 'plain',
// label/image size and pos in pc: 0..100
mSize: 30,
mPosX: 50,
mPosY: 50,
// label
label: 'no label',
fontname: 'sans',
fontcolor: '#333',
// image element
image: null
}
lrsjng/kjua (MIT)
QR Code is a registered trademark of DENSO WAVE INCORPORATED.
FAQs
Dynamically generated QR codes for Wechat Miniapps.
The npm package @fourdim/wechat-miniapp-qrcode receives a total of 2 weekly downloads. As such, @fourdim/wechat-miniapp-qrcode popularity was classified as not popular.
We found that @fourdim/wechat-miniapp-qrcode demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.