@aikochan2k6/qrcode-terminal

中文文档
0.12.1发布于 2022/07/22CommonJS零依赖近 30 天下载 2068

QRCodes, in the terminal (Whoa, not cli support)

此软件包已被标记为弃用

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

原始使用文档
文档目录4 节
  1. Install
  2. Usage
  3. Install
  4. Usage

QRCode Terminal Edition Build Status

Going where no QRCode has gone before.

Basic Example

Node Library

Install

Can be installed with:

$ npm install qrcode-terminal

and used:

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

Usage

To display some data to the terminal just call:

qrcode.generate('This will be a QRCode, eh!');

You can even specify the error level (default is 'L'):

qrcode.setErrorLevel('Q');
qrcode.generate('This will be a QRCode with error level Q!');

If you don't want to display to the terminal but just want to string you can provide a callback:

qrcode.generate('http://github.com', function (qrcode) {
    console.log(qrcode);
});

If you want to display small output, provide opts with small:

qrcode.generate('This will be a small QRCode, eh!', {small: true});

qrcode.generate('This will be a small QRCode, eh!', {small: true}, function (qrcode) {
    console.log(qrcode)
});

Command-Line

Install

$ npm install -g qrcode-terminal

Usage

$ qrcode-terminal --help
$ qrcode-terminal 'http://github.com'
$ echo 'http://github.com' | qrcode-terminal

Support

  • OS X
  • Linux
  • Windows

Server-side

node-qrcode is a popular server-side QRCode generator that renders to a canvas object.

Developing

To setup the development envrionment run npm install

To run tests run npm test

Contributers

Gord Tanner <[email protected]>
Micheal Brooks <[email protected]>

版本与发布记录

@aikochan2k6/qrcode-terminal 共发布 2 个版本,首次发布于 2022/06/26;过去 12 个月发布了 0 个版本。

版本发布日期距今
0.12.1latest2022/07/224 年前
0.12.02022/06/264 年前

关于 @aikochan2k6/qrcode-terminal 的常见问题

@aikochan2k6/qrcode-terminal 是什么?

QRCodes, in the terminal (Whoa, not cli support)注意:该包已被作者标记为弃用——Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

如何安装 @aikochan2k6/qrcode-terminal?

在项目目录运行 npm install @aikochan2k6/qrcode-terminal,或使用 pnpm add / yarn add / bun add。

@aikochan2k6/qrcode-terminal 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/aikochan2k6__qrcode-terminal 是否存在。

@aikochan2k6/qrcode-terminal 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@aikochan2k6/qrcode-terminal 可以商用吗?

@aikochan2k6/qrcode-terminal 使用 未声明 许可。package.json 没有声明许可证。没有许可证的代码默认保留全部权利,商用前请联系作者或查看仓库中的 LICENSE 文件。以上为概括,不构成法律意见,请以许可原文为准。

@aikochan2k6/qrcode-terminal 的下载量有多少?

根据 npm 官方下载统计,@aikochan2k6/qrcode-terminal 在 2026/10/05 – 2026/11/03 这 30 天内被下载 2,068 次,日均约 69 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@aikochan2k6/qrcode-terminal 还在维护吗?

最新版本 0.12.1 发布于 2022/07/22(4 年前);至今共发布 2 个版本,其中过去 12 个月发布了 0 个;首次发布于 2022/06/26。作者已将其标记为弃用,新项目建议寻找替代方案。