@acegoal07/timestamp-progress 中文文档教程
timestamp-progress
About
将 timeStamps 转换为 progressBar 的简单依赖
安装使用:
npm i @acegoal07/timestamp-progress
Usage
const progress = require('@acegoal07/timestamp-progress');
// Supported timestamp layouts 00:SS, MM:SS or HH:MM:SS
// Input
const duration = "03:20"; // 09:00:28
const position = "01:20"; // 07:00:28
// Creation
const progressBar = progress(position, duration); // Reference progressBar to display
Settings
size - The size of the progress bar ( default: 40 )
timestamp - Weather or not to display timestamp in output ( default: true )
percentage - Whether or not to disable percentage completed instead of ( default: false )
line - The character used to display remaining length ( default: □ )
slider - The character used to display the progress ( default: ■ )
如何使用设置: ``` js // 方式一 设置 = { 尺寸:20, 时间戳:假, 百分比:真实, 线: ”-”, 滑块:“#” } const progressBar1 = 进度(位置、持续时间、设置); 控制台日志(progressBar1);
//方式2 const progressBar = progress(position, duration, {size = 20, timestamp = false, percentage = true, line = "-", slider = "#"}); 控制台日志(progressBar2);
timestamp-progress
About | Usage | Settings | Author
About
A simple dependence that converts timeStamps into a progressBar
To install use:
npm i @acegoal07/timestamp-progress
Usage
const progress = require('@acegoal07/timestamp-progress');
// Supported timestamp layouts 00:SS, MM:SS or HH:MM:SS
// Input
const duration = "03:20"; // 09:00:28
const position = "01:20"; // 07:00:28
// Creation
const progressBar = progress(position, duration); // Reference progressBar to display
Settings
size - The size of the progress bar ( default: 40 )
timestamp - Weather or not to display timestamp in output ( default: true )
percentage - Whether or not to disable percentage completed instead of ( default: false )
line - The character used to display remaining length ( default: □ )
slider - The character used to display the progress ( default: ■ )
How to use settings: ``` js // Way 1 settings = { size: 20, timestamp: false, percentage: true, line: "-", slider: "#" } const progressBar1 = progress(position, duration, settings); console.log(progressBar1);
// Way 2 const progressBar = progress(position, duration, {size = 20, timestamp = false, percentage = true, line = "-", slider = "#"}); console.log(progressBar2);
你可能也喜欢
- 99voices_npm_tyk_client 中文文档教程
- @2003scape/rsc-client 中文文档教程
- @3liv/rijs.sync 中文文档教程
- @44north/prettier-config 中文文档教程
- @6footgeek/validate-whitespace-string 中文文档教程
- @abbjs/slownie 中文文档教程
- @abip/scp-common 中文文档教程
- @ablula/default-blog-theme 中文文档教程
- @aboutweb/irrigable-packagejson 中文文档教程
- @accessible/toggle-button 中文文档教程