0.1.1 • Published 3 years ago

terminal-img-qrcode v0.1.1

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

二维码图片渲染到终端展示

主要用途,还是将生成的二维码图片渲染到终端展示,应用场景的话,比如小程序自动化,不依赖开发者工具等 打印到终端的二维码可以及时展示,及时调试,方便测试,方便自动化部署等

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.