import { default } from "https://deno.land/x/progress@v1.5.1/mod.ts";
ProgressBar single progress bar.
Constructors
Title, total, complete, incomplete, can also be set or changed in the render method
- title Progress bar title, default: ''
- total total number of ticks to complete,
- width the displayed width of the progress, default: 50
- complete completion character, default: colors.bgGreen(' '), can use any string
- incomplete incomplete character, default: colors.bgWhite(' '), can use any string
- clear clear the bar on completion, default: false
- interval minimum time between updates in milliseconds, default: 16
- display What is displayed and display order, default: ':title :percent :bar :time :completed/:total'
- prettyTime Whether to pretty print time and eta
- output Output stream, can be Deno.stdout or Deno.stderr, default is Deno.stdout
Properties
private
encoder: TextEncoderMethods
private
breakLine(): Promise<void>private
clearLine(direction?: Direction): Promise<void>private
showCursor(): Promise<void>private
stdoutWrite(msg: string): Promise<void>private
write(msg: string): Promise<void>console(message: string | number): Promise<void>
interrupt the progress bar and write a message above it
end(): Promise<void>
end: end a progress bar. No need to call in most cases, unless you want to end before 100%
render(completed: number, options?: renderOptions): Promise<void>
"render" the progress bar
completed
completed valueoptions
optional parameterstitle
progress bar titletotal
total number of ticks to completetext
optional, custom text, default: ''complete
completion character, If you want to change at a certain moment. For example, it turns red at 20%incomplete
incomplete character, If you want to change at a certain moment. For example, it turns red at 20%prettyTimeOptions
prettyTime options