@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);
你可能也喜欢
- 96eleven-react-components-library 中文文档教程
- 9wares-react 中文文档教程
- @0x/ts-doc-gen 中文文档教程
- @0xc/invisihash 中文文档教程
- @1st-setup/openthermgateway 中文文档教程
- @21epub/create-storybook-react-library 中文文档教程
- @8pattern/jselection 中文文档教程
- @_lukepatrick/postgraphile-upsert-plugin 中文文档教程
- @a-soul/extractor-douyin 中文文档教程
- @a.davydov/react-kanban 中文文档教程