nodejs 下 console 常见 api 封装
安装
npm i qiao-console
使用
// cjs
const { clear, writeLine } = require('qiao-console');
// mjs
import { clear, writeLine } from 'qiao-console';
清空 console
clear();
在 console 的某一行输出信息
- line
- 类型: number
- 说明: 行数
- content
- 类型: string
- 说明: 内容
writeLine(line, content);
// clear line
clearLine();
// move to
moveTo(x, y);
// write
write(msg);
// write line xy
writeLineXY(x, y, msg);