1.0.2 • Published 1 year ago

useless-progress v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

useless-progress

Produce a useless automatic scrolling bar that grows on its own.

Download

npm i useless-progress

example

import Progress from 'useless-progress';

const progress = new Progress({
  onprogress: function (progress) {
    console.log(progress)
  }
})
progress.start()

/**
 * console.log
 * 0
 * 0.007653891978612326
 * 0.015249201894804387
 * 0.0227863781293538
 * 0.030265865631180278
 * ...
 * 0.9997831489834735
 * 0.9997848087377296
 * 0.9997864557884056
 * 0.9997880902327339
 */

config

AttractivedescriptionTypedefault
onprogressCallback when progress increases,parameter is the current progressfunction-
extremeTimeTime from 0 to 0.99 (ms)number60000
frequencyFrequency of progress increasenumber200

method

Namedescription
start()
end()Stop working and set progress to 1
getProgress()
setProgress()
1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago