useless-progress
Advanced tools
Comparing version
{ | ||
"name": "useless-progress", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Produce a useless automatic scrolling bar that grows on its own.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
# useless-progress | ||
Produce a useless automatic scrolling bar that grows on its own. | ||
## Download | ||
```bash | ||
npm i useless-progress | ||
``` | ||
## example | ||
```js | ||
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 | ||
| Attractive | description | Type | default | | ||
| ----------- | ------------------- | ------------------- | ------- | | ||
| onprogress | | function | - | | ||
| extremeTime | Time from 0 to 0.99 | time(millisecond) | 60000 | | ||
## method | ||
| Name | description | | ||
| ------------- | ---------------------------------- | | ||
| start() | | | ||
| end() | Stop working and set progress to 1 | | ||
| getProgress() | | | ||
| setProgress() | | | ||
3758
44.26%54
2600%