UNPKG

slog-progress

Version:

nodejs简单的进度条

27 lines (17 loc) 534 B
# slog-progress > 简单的进度条 ## 安装 ```bash npm install slog-progress ``` ## 使用 ```javascript const Slogbar = require("slog-progress"); //第一个参数为描述,冒号加英文如:bar为占位符,内置 :percent , :bar ,:current , :total,可以自定义,如 :token1,但是不要和内置相同,第二个参数为进度条长度,默认50字符 let bar = new Slogbar("进度 :percent :token1 :bar :current/:total", 50); bar.render({ current: 12, total: 100, token1: "something", }); ```