1.1.0 • Published 2 years ago

@acegoal07/timestamp-progress v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

npm i @acegoal07/timestamp-progress
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
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:

// 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);
1.1.0

2 years ago

1.0.7-a

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago