terminal-img-qrcode
v0.1.1
Published
renders an image to the terminal.
Downloads
1
Maintainers
Readme
二维码图片渲染到终端展示
主要用途,还是将生成的二维码图片渲染到终端展示,应用场景的话,比如小程序自动化,不依赖开发者工具等 打印到终端的二维码可以及时展示,及时调试,方便测试,方便自动化部署等
Installation
npm install terminal-img-qrcode
Usage
var terminalImgQrcode = require('terminal-img-qrcode');
Passing image data in node
var terminalImgQrcode = require("terminal-img-qrcode");
var buffer = fs.readFileSync(__dirname + '/image.png');
terminalImgQrcode(buffer)
API
terminalImage(image)
Get the image as a string
that you can log manually.
image
Type: string | Buffer
File path to an image or an image as a buffer.