UNPKG
smooth-progress
Version:
latest (1.1.0)
1.1.0
1.0.4
1.0.3
1.0.2
1.0.1
1.0.0
0.0.0
pixel-by-pixel CLI progress bar
github.com/dickeyxxx/smooth-progress
dickeyxxx/smooth-progress
smooth-progress
/
test.js
13 lines
(9 loc)
•
245 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/usr/bin/env node
'use strict'
let
progress =
require
(
'./index'
)
let
bar =
progress
(
512
*
1024
)
let
interval =
setInterval
(
function
(
) {
let
chunk =
Math
.
random
() *
1024
bar.
tick
(chunk)
if
(bar.
complete
)
clearInterval
(interval) },
5
)